Interview Questions.

C# INTERVIEW QUESTIONS

fluid

C# INTERVIEW QUESTIONS

Q1. WHAT IS C-SHARP (C#)?

Ans: C# is a sort safe, oversaw and object situated language, which is gathered by .Net structure for creating middle language (IL).

Q2. Make sense of THE FEATURES OF C#?

Ans: Below are a portion of the elements upheld in C#:

Constructors and Destructors

Properties

Passing Parameters

Clusters

Primary

XML Documentation and

Indexers

Q3. Show SOME OF THE ADVANTAGES OF C#?

Ans: Below are the benefits of C#:

Simple to learn

Object arranged

Part arranged

Part of .NET structure

Q4. WHAT ARE IDE'S PROVIDED BY MICROSOFT FOR C# DEVELOPMENT?

Ans: Below are the IDE's utilized for C# advancement:

Visual Studio Express (VCE)

Visual Studio (VS)

Visual Web Developer

Q5. Make sense of THE TYPES OF COMMENTS IN C#?

Ans: Below are the kinds of remarks in C#:

Single Line Comment Eg ://

Multiline Comments Eg:/* */

XML Comments Eg :///

Q6. Make sense of SEALED CLASS IN C#?

Ans: Sealed class is utilized to keep the class from being acquired from different classes. So "fixed" modifier additionally can be utilized with techniques to keep away from the strategies to supersede in the youngster classes.

Q7. Drill down THE DIFFERENCES BETWEEN ARRAY AND ARRAYLIST IN C#?

Ans:

Cluster stores the qualities or components of same information type yet arraylist stores upsides of various datatypes.

Clusters will utilize the decent length however arraylist doesn't utilizes fixed length like exhibit.

Q8. For what reason TO USE "Utilizing" IN C#?

Ans: "Utilizing" explanation calls - "arrange" strategy inside, at whatever point any exemption happened in some technique call and in "Utilizing" proclamation objects are perused just and can't be reassignable or modifiable.

Q9. Make sense of NAMESPACES IN C#?

Ans: Namespaces are holders for the classes. We will utilize namespaces for gathering the connected classes in C#. "Utilizing" catchphrase can be utilized for utilizing the namespace in other namespace.

Q10. For what reason TO USE KEYWORD "CONST" IN C#? GIVE AN EXAMPLE.

Ans: "Const" watchword is utilized for making a substance steady. We can't reassign the worth to steady.

Eg: const string _name = "Test".

Q11. WHAT IS THE DIFFERENCE BETWEEN "Consistent" AND "READONLY" VARIABLES IN C#?

Ans:

"Const" watchword is utilized for making an element steady. We can't adjust the worth later in the code. Esteem allocating is compulsory to steady factors.

"readonly" variable worth can be changed during runtime and worth to readonly factors can be allocated in the constructor or at the hour of announcement.

Q12. Make sense of "STATIC" KEYWORD IN C#?

Ans: "Static" catchphrase can be utilized for proclaiming a static part. In the event that the class is made static, every one of the individuals from the class are likewise made static. In the event that the variable is made static, it will have a solitary case and the worth change is refreshed in this occasion.

Q13. WHAT IS THE DIFFERENCE BETWEEN "Arrange" AND "Settle" VARIABLES IN C#?

Ans:

Arrange: This strategy utilizes interface - "IDisposable" point of interaction and it will free up both oversaw and unmanaged codes like - information base association, documents and so on.

Settle: This strategy is called inside dissimilar to Dispose technique which is called expressly. It is called by garbage man and can't be called from the code.

Q14. HOW THE EXCEPTION HANDLING IS DONE IN C#?

Ans: In C# there is a "attempt… get" block to deal with the mistake.

Q15. Could WE at any point EXECUTE MULTIPLE CATCH BLOCKS IN C#?

Ans: No. When any exemption is happened it executes explicit special case get block and the control emerges.

Q16. For what reason TO USE "At long last" BLOCK IN C#?

Ans: "At long last" block will be executed regardless of special case. So while executing the code in attempt block when exemption is happened, control is gotten back to get block and finally "at last" block will be executed. So shutting association with data set/delivering the record overseers can be kept in "at last" block.

Q17. WHAT IS THE DIFFERENCE BETWEEN "Conclude" AND "At last" METHODS IN C#?

Ans:

Settle: This strategy is utilized for trash assortment. So prior to obliterating an article this technique is called as a feature of tidy up action.

At long last: This strategy is utilized for executing the code regardless of special case happened or not.

Q18. WHAT IS THE DIFFERENCE BETWEEN "Toss EX" AND "Toss" METHODS IN C#?

Ans:

"toss ex" will supplant the stack hint of the special case with stack follow data of re toss point.

"toss" will safeguard the first stack follow data.

Q19. Will WE HAVE ONLY "Attempt" BLOCK WITHOUT "CATCH" BLOCK IN C#?

Ans: Yes we can have just attempt block without get block however we must have at long last block.

Q20. Rattle off TWO DIFFERENT TYPES OF ERRORS IN C#?

Ans: Below are the kinds of blunders in C#:

Gather Time Error.

Run Time Error.




CFG