C# Programming - Constructors - Discussion

Discussion Forum : Constructors - General Questions (Q.No. 4)
4.
Which of the following statements are correct about static functions?
  1. Static functions can access only static data.
  2. Static functions cannot call instance functions.
  3. It is necessary to initialize static data.
  4. Instance functions can call static functions and access static data.
  5. this reference is passed to static functions.
1, 2, 4
2, 3, 5
3, 4
4, 5
None of these
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
12 comments Page 2 of 2.

Penchala Naidu said:   1 decade ago
In case of Constructor concept, Static constructor cannot access non-static variables but non-static constructor can access static variables for initialization.

Dheeraj said:   1 decade ago
Option 2. Is wrong? static Main () can call instance methods of class.


Post your comments here:

Your comments will be displayed after verification.