1
Answer

what is mean by instance fields,instance varibles in c#.net with examples exaplaine?

Photo of P Narasimha

P Narasimha

16y
3.2k
1
what is mean by instance fields,instance varibles in c#.net with examples exaplaine?

Answers (1)

0
Photo of Bechir Bejaoui
NA 20.1k 5.3m 16y

The instance members in general are member who are reached from the instances objects of the class, I explain
Instance class

suppose you have defined a class classA

class ClassA
    {
        public void MethodA()
        {
            ;
        }
        static public void MethodB()
        {
            ;
        }
    }

if you want to access the MethodA then you have to do

ClassA instance = new ClassA();
instance ->(spell a point)-> (intellisense will appear)->then you can find MethodA in the intellisense list
at the contrast MethodB will not be figured out in the intellisense list becasue it is static method or class method and we call it class method because it is only reachable from the class it self
I explain

ClassA ->(spell a point)-> (intellisense will appear)->then you can find MethodB in the intellisense list

if you're satisfied then please mark this thread as answered