Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Basics Interview Question in C# (Part 2)

C# Interview Question



7) What is the difference between arrays and collection?
Array:
  1. Size of an Array is Static . It cannot resized at runtime.
  2. Value of the Array should be same as data type of the array.
Collection:
  1. Size of collection can be changed dynamically. It does not have fixed size.
  2. Collection can have elements of different types.
8) Explain Sealed Class in C#?

Sealed class is class which cannot be inherited from other classes. 

9) Explain sealed modifier in C#?
“Sealed” method are those methods which cannot override in the child classes.

10) Explain Static keyword in C#?
“Static” keyword can be declared in static member. If you declared class as static then all the members of the class are made static. Only one copy of static exists.
11) How the exception handling is done in C#?
We can do it with the help of “try… catch” block to handle the error/exception.
12)  What is object-oriented programming (OOP)?

OOP consists classes that contain properties, methods, fields, and events. It is used to create Logically Module. We create object of class to access their variables ,property and Method in another class or method. So you can say that we are using encapsulation feature with the help of object that contains the features, such as data and behavior that are associated to a class

 .NET Framework supports only OOP languages, such as Visual Basic .NET, Visual C#, and Visual C++.


Kindly click on Follow me . Click here for more questions





This post first appeared on Pivot In SQL Server, please read the originial post: here

Share the post

Basics Interview Question in C# (Part 2)

×

Subscribe to Pivot In Sql Server

Get updates delivered right to your inbox!

Thank you for your subscription

×