Showing posts with label C Sharp. Show all posts
Showing posts with label C Sharp. 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.
What are the different ways a method can be overloaded?
Different parameter data types, different number of parameters, different order of parameters.
Labels:
C Sharp
What’s the difference between an interface and abstract class?
In an interface class, all methods are abstract - there is no implementation. In an abstract class some methods can be concrete. In an interface class, no accessibility modifiers are allowed. An abstract class may have accessibility modifiers.
Labels:
C Sharp
What’s the difference between the System.Array.CopyTo() and System.Array.Clone()?
The Clone() method returns a new array (a shallow copy) object containing all the elements in the original array. The CopyTo() method copies the elements into another existing array. Both perform a shallow copy. A shallow copy means the contents (each array element) contains references to the same object as the elements in the original array. A deep copy (which neither of these methods performs) would create a new instance of each element's object, resulting in a different, yet identacle object.
Labels:
C Sharp
Can you inherit multiple interfaces?
Can you inherit multiple interfaces?
Yes, Interface only support multiple inheritance in C#
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
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.