1. Which operators cannot be overloaded ?
=, ., ?:, ->, new, is, sizeof, typeof
2. Comparsion operator
==, !=, <, >, <=, >=
They must be overloaded in pairs.
3. How do you overload operators ?
By defining static member functions using the operator keyword.
4. Can non-static classes contain static members ?
YES.
5. Can static classes contain non-static members ?
NO.
6. Can you access static members of non-static classes using instances of non-static members ?
NO. Static members must be accessed using thier class names, not using instances
7. What all can be static ?
method, field, property, or event
constructors can be static.
const behave like static fields , but static keyword cannot be used with them
operator overloading functions are always a static
Indexers cannot be static, the allowed access specifiers for indexers are only
Friday, July 8, 2011
Subscribe to:
Post Comments (Atom)
How to check local and global angular versions
Use the command ng version (or ng v ) to find the version of Angular CLI in the current folder. Run it outside of the Angular project, to f...
-
Most of the google tutorials on keras do not show how to display a confusion matrix for the solution. A confusion matrix can throw a clear l...
-
This error means you have created the DbContext but not configured/added it to the project using either DI in startup.cs or by using DbCon...
-
CONCLUSION : 1. Normally, use following two when you do not want query compilation also to come into picture. CHECKPOINT DBCC DROPCLEA...
No comments:
Post a Comment