.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Interview Question >> C# >> Post New Question Subscribe to Interview Questions

What is the default access specifier for a top level class which are not nested into other class?

Posted By :Shashi Ray     Posted Date :September 08, 2008    Points :10   Category :C# 
internal

You can also find related Interview Question to What is the default access specifier for a top level class which are not nested into other class?  below: 

If any .NET language has access to everything in the Base Class Library, why is there so much talk about C#?

  
Although in theory all .NET languages have equal access to the BCL, in reality it was left up to the language teams to determine what level of support they wanted to offer, at least beyond the minimums needed for basic compliance. In our opinion, C#, because it was developed as a new language specifically for the .NET platform, has the best support for .NET applications. (More...)

How can I look up a parent class method or property of any System-level object?

  
Use the Class View window, accessed from the standard toolbar by clicking View | Class View. (More...)

Can you write a class without specifying namespace? Which namespace does it belong to by default??

  
Yes, you can, then the class belongs to global namespace which has no name. For commercial products, naturally, you wouldn't want global namespace (More...)

Are private class-level variables inherited?

  
Yes, but they are not accessible, so looking at it you can honestly say that they are not inherited. But they are. (More...)

Are private class-level variables inherited?

  
Yes, but they are not accessible, so looking at it you can honestly say that they are not inherited. But they are. (More...)

How can you access a private method of a class?

  
Use .Net Reflection. Using reflection we can invoke private methods too.

Example:

Car car = new Car();
Type type = car.GetType();
MethodInfo methodInfo = type.GetMethod("ShiftGearUp", BindingFlags.NonPublic | BindingFlags.Instance);
methodInfo.Invoke(car, null);

Pre: Create a class Car with private method "ShiftGearUp" (More...)

What are class access modifiers ?

  
Access modifiers are keywords used to specify the declared accessibility of a member or a type. This section introduces the four access modifiers:
. Public - Access is not restricted.
. Protected - Access is limited to the containing class or types derived from the containing class.
. Internal - Access is limited to the current assembly.
. Protected inertnal - Access is limited to the current assembly or types derived . from the containing class.
. Private - Access is limited to the containing type.
(More...)

Are private class-level variables inherited?

  
Yes,private class members are inheritable, but they are not accessible (More...)

What is nested Class?

  
Class within the Class (More...)

What is nested class?

  
A Nested classes are classes within classes. A nested class is any class whose declaration occurs within the body of another class or interface. (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

 
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.


Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend