-
C# Data Table Multiple Rows
You have multiple rows in C# data table and you have to save it in database using just one call, How will you do it?
Which operator is used for TypeCasting
A) [ ]B) ( )C) TypeOf
Which of the following statement is invalid with regards to constructor
A) Constructors should have the same name as class nameB) Constructors have to be public so that class can be instantiatedC) Constructors can not be overloadedExplanation: Constructors can be overloaded with different parameters
Which of the following statements is not true for interfaces
A) Interface definitions does not have implementationB) Interfaces must be declared as publicC) Interfaces can be instantiatedD) Interface does not have constructorsExplanation: Interfaces can only be implemented by inheriting and they can not be instantiated
In a multilevel hierarchy how are the constructors are called
A) TopDownB) BottomUpC) None
Advantages of static class over class ?
When to use static class and when to use normal class ?
The following code fails. Why?
int a = 5; int b = 5; object oa = a; object ob = b; Debug.Assert(oa == ob, "oa is not equal ob");
When to use string classes
when we have string builder which are mutable why we need immutable string classes in C#.
Can we write Dotnet Console program in Unix
Can we write Dotnet Console program in Unix ? If yes Give one example.
Wap on 3d matrix by using random function print o/p in a file.
Wap on 3d matrix by using random function print in a file.
Find the prime numbers from out put of above program.
Find the even numbers from o/p of 1st program.
Find the odd numbers from o/p of 1st program.
Program on 3d matrix using random function print the o/p in file.
program on 3d matrix using random function print the o/p in file
find the even,odd,prime numbers from above output file.
please do needful help
thank youMy switch statement works differently! Why?
C# does not support an explicit fall through for case blocks. The following code is not legal and will not compile in C#: switch(x){case 0:// do somethingcase 1:// do something in common with 0default:// do something in common with//0, 1 and everything elsebreak;}To achieve the same effect in C#, the code must be modified as shown below (notice how the control flows are explicit): class Test{public...
By declaring a base class function as virtual we allow the function to be overridden in subclasses
A) TrueB) FalseExplanation: If a function is declared virtual it needs to be overridden in subclass
C# sealed variables
I have taken a windows application and a button control in it.I want to declare a variable as a sealed and use that variable with in same class as we cannot use in other class. class test { public sealed int x = 5; public void abc() { MessageBox.Show(x.ToString()); } } class best :test { ...
Exception Handling
what is the necessary for "throws" and "throw" in exception handling??
Even Though the exception has been thrown automatically and being handled by try and catch block..
Ans