-
Which preprocessor directive are used to mark that contain block of code is to be treated as a single block
A) # define & #undefB) # Region & #EndRegionC) #Line
-
How are the attributes specified in C#
A) Enclosed with in [ ]B) Enclosed with in ( )C) Enclosed with in { }
-
For performing repeated modification on string which class is preferred
A) StringB) StringBuilderC) Both
-
In order to use stringbuilder in our class we need to refer
A) System.TextB) System.IOC) System.StringBuilder
-
What happens when you create an arraylist as ArrayList Arr=new ArrayList()
A) An arraylist of object Arr is created with the capacity of 16B) An arraylist of object Arr is created with the capacity of 20C) An arraylist of object Arr is created with the capacity of 26Explanation: Default capacity is 16 if size is not specified
-
GetEnumerator( ) of Ienumerable interface returns
A) IenumeratorB) IcollectionC) Ienumerable
-
How do you add objects to hashtable
A) With Add methodB) With insert MethodC) With = operator
-
Code running under the control of CLR is often referred as
A) Source CodeB) Managed CodeC) Unmanaged CodeExplanation: Source code is compiled to MSIL, which is generally known as managed code
-
Platform specific code is obtained when
A) source code is compiled to get MSILB) when MSIL is compiled by CLRC) Both of the aboveExplanation: When CLR compiles the managed it generates the native code which is compatible to platform.
-
Default Access Specifer
What is default access specifer of a class in C#? Is it internal or private?class foo{ int Var; }In the above code snippet. What is the default access specifier for the variable Var.
-
-
It is not possible for a delegate to wrap more than 1 method
A) True
B) False -
C# program to count first 50 number divisible by 3
How to write c# program to count first 50 number divisible by 3 or 4.how to write c# program to count first 50 number divisible by 3 and 4.
-
-
AJAX in C#
How to implement AJAX in C#?
-
Describe the accessibility modifier protected internal.
It is available to derived classes and classes within the same Assembly (and naturally from the base class it is declared in).
-
Which of the following is not a member of stringbuilder
A) Append ( )B) Insert( )C) Replace ( )D) Substring( )
-
-
-
C# Interview Questions
Ans