Oracle Asp.Net C# interview Questions for freshers
Q. What is the difference between ExecuteScalar and ExecuteNonQuery ?
A. ExecuteScalar returns output value where as ExecuteNonQuery does not return any value but the number of rows affected by the query. ExecuteScalar used for fetching a single value and ExecuteNonQuery used to execute Insert and Update statements.
Q.What is the difference between methods – “System.Array.Clone()” and “System.Array.CopyTo()” in C# ?
A. “CopyTo()” method can be used to copy the elements of one array to other.
“Clone()” method is used to create a new array to contain all the elements which are in the original array.
Q. List out some of the exceptions in C# ?
A. Below are some of the exceptions in C#
Q. What you mean by delegate in C#?
A. Delegates are type safe pointers unlike function pointers as in C++.
Delegate is used to represent the reference of the methods of some return type and parameters.