0

I've got some really fundamental questions that I am almost embarassed to ask.
But what is the real importance of properties in C#? And how many ways are there to
invoke a method?

Ssam .......

2
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by sam63
1

Properties are to control access to member variables. You can make them read only or read/write. I'm sure there's this other important thing but I do a lot of mushroom.

There's only two ways I know of:

calling it directly

FooClass.StaticMethod();
FooObject.InstanceMethod();

or through an event handler.

this.click += new EventHandler(foo_method);

Let me know if that is not what you meant.

0

Thanks ! I really appreciate you taking the time to reply...

Ssam.......

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.