Showing posts with label C#. Show all posts
Showing posts with label C#. Show all posts

Monday, November 16, 2009

What namespaces are necessary to create a localized application?

System.Globalization and System.Resources.

Where is the output of TextWriterTraceListener redirected?

To the Console or a text file depending on the parameter passed to the constructor.

What’s a delegate?

A delegate object encapsulates a reference to a method. delegate is a function pointer

How is method overriding different from method overloading?

When overriding a method, you change the behavior of the method for the derived class.  Overloading a method simply involves having another method with the same name within the class.

Can you allow a class to be inherited, but prevent the method from being over-ridden?

Yes.  Just leave the class public and make the method sealed.

Can you inherit multiple interfaces?

Can you inherit multiple interfaces? 
Yes, Interface only support multiple inheritance in C#

Is it possible to have a static indexer in C#? allowed in C#.

Is it possible to have a static indexer in C#? allowed in C#. 
No

Is it possible to inline assembly or IL in C# code?

ANS:NO

What's C#



C# (pronounced C-sharp) is a new object oriented language from Microsoft and is derived from C and C++. It also borrows a lot of concepts from Java too including garbage collection. More at http://msdn.microsoft.com/vstudio/nextgen/technology/csharpintro.asp, http://msdn.microsoft.com/library/default.asp?URL=/library/dotnet/csspec/vclrfcsharpspec_Start.htm and http://msdn.microsoft.com/vstudio/nextgen/technology/csharpdownload.asp

Source
Disclaimer:- All articles are not written by me.i copied some useful definition and tutorials from others site, copied site location is shown in all articles bottom as source.