What are the collections of Session Object? Contents collection contains all the variables established for a session without using the tag. Static collection contains all the objects created What is the difference between ASP and HTML? Or Why ASP is better than HTML? - ASP executes code on the server side whereas the browser interprets HTML. - ASP can use any scripting languages - Gets feedback from the user and return information to the user - Create pages that will be customized to display only things that will be of interest to a particular user - Can edit contents of a web page by updating a text file or a database rather than the HTML code itself What are the event handlers of Application Object? Application_OnStart- This event will be fired when the first visitor hits the page. Application_OnEnd- This event runs when the server is stopped. Name some of the ASP components? Ad Rotator component- a way to manage advertisements on the web site. Content Linker component - a techn...
Does C# support C type macros? No. C# does not have macros. Keep in mind that what some of the predefined C macros (for example, __LINE__ and __FILE__) give you can also be found in .NET classes like System.Diagnostics (for example, StackTrace and StackFrame), but they'll only work on debug builds. Can you store multiple data types in System.Array? No. Is it possible to inline assembly or IL in C# code? No. Can you declare the override method static while the original method is non-static? No, you cannot, the signature of the virtual method must remain the same, only the keyword virtual is changed to keyword override Does C# support multiple inheritance? No, use interfaces instead. Can multiple catch blocks be executed? No, once the proper catch code fires off, the control is transferred to the finally block (if there are any), and then whatever follows the finally block. Can you override private virtual methods? No, moreover, you cannot access private methods in inherited cla...
Will finally block get executed if the exception had not occurred? Yes. What is the C# equivalent of C++ catch (…), which was a catch-all statement for any possible exception? Does C# support try-catch-finally blocks? Yes. Try-catch-finally blocks are supported by the C# compiler. Here's an example of a try-catch-finally block: using System; public class TryTest { static void Main() { try { Console.WriteLine("In Try block"); throw new ArgumentException(); } catch(ArgumentException n1) { Console.WriteLine("Catch Block"); } finally { Console.WriteLine("Finally Block"); } } } Output: In Try Block Catch Block Finally Block If I return out of a try/finally in C#, does the code in the finally-clause run? Yes. The code in the finally always runs. If you return out of the try block, or even if you do a "goto" out of the try, the finally block always runs, as shown in the following example: using System; class main { public static void Main() { t...