Profile Picture
IT Made Easy
The site provides some rough IT Notes that make your life easier. The site currently has notes on HTML, CSS, Regex, OOPS, JS, JQuery, PHP, Java, ASP.NET, C#, Database, Linux, URL Rewrite, SEO, Project Management and Hosting. Please do share this site if you like.

Classes

Next
Next
  • Partial Classes and Methods
  • Automatic Properties
  • reference to a base class can refer to an instance of a subclass
  • An upcast operation creates a base class reference from a subclass reference
  • A downcast operation creates a subclass reference from a base class reference. It has to be explicit.
  • The as operator performs a downcast that evaluates to null if the downcast fails
  • The is operator tests whether a downcast would succeed
  • Any abstract member forces the entire class to be abstract. So no actual object instances of base class. It has empty implementation.
  • A function marked as virtual can be overridden by subclasses wanting to provide a specialized implementation
  • Remember override and base.
  • From subclass to base class constructor arguments are evaluated and in reverse order constructor bodies execute.
  • In case of method overloading, when an overload is called, the most specific type has precedence. The particular overload to call is determined statically (at compile time) rather than dynamically (at runtime).
  • Accessibility inter by default for nonnested classes
  • A subclass itself can be less accessible than a base class, but not more accessible

IT Notes

by VinodSebastian



IT Downloads


Catalogue