FeedBack Form

Your Name :
Your Email :
Your Location :
Your Message :
   
FeedBack

C#.NET INTERVIEW QUESTIONS & ANSWERS

36. Define inheritance?
  Inheritance is the process by which objects of one class acquire properties of objects of another class.
  Posted by Aswini Aluri. (Nov 20, 2013 )
 

Inheritance is the process creating new class from already exsisting class. .

  Posted by Anjaneyulu. (Oct 22, 2013)
 

Inheritance is the process of using the members of one class to the another class by establing parent-child relationship between them. .

Your Name Your Email-ID
Your Answer
 
37. What is the difference between constants and read-only variables that are used in programs?
 
  • Constants are dealt with at compile-time.
  • Constants support value-type variables.
  • Constants should be used when it is very unlikely that the value will ever change.

  • Read-only variables are evaluated at runtime.
  • Read-only variables can hold reference type variables.
  • Read-only variables should be used when run-time calculation is required.
Your Name Your Email-ID
Your Answer
 
38. Does C# support multiple-inheritance?
  No, use interfaces instead.
Your Name Your Email-ID
Your Answer
 
39. What are the advantages of get and set properties in C#?
 
  • You can implement properties with the type-safe get and set methods.
  • You can create a property by defining an externally available name and then writing the set and get methods.
  • The get property accessor is used to return the property value.
  • The set property accessor is used to assign a new value.
  Posted by Aswini Aluri. (Nov 20, 2013 )
 

Get accessor is used to read the data from data field. Set accessor is used to write the data in data field.

get { return name; }
set { name=value; } .

Your Name Your Email-ID
Your Answer
 
40. What is the main difference between a subprocedure and a function?
  Subprocedures do not return a value, while functions do.
Your Name Your Email-ID
Your Answer