T
Tem
Im learning c#. want to make sure my understanding of certain concepts is
correct
- is struct basically a sealed static class?
- what exactly does the keyword virtual do?
- what is the best practice for assigning accessors(public/private)? limit
scope as much as possible?
- if you add the keyword static to a class does that make every methods in
that class static? or is this not allowed?
I've seen code where it like
public class Cat
....
....
just like a normal class
when it instantiates the class, it adds the static keyword
static Cat c = new Cat();
What does this mean? how is this different from a static class?
Thanks for clearing up some confusions
Tem
correct
- is struct basically a sealed static class?
- what exactly does the keyword virtual do?
- what is the best practice for assigning accessors(public/private)? limit
scope as much as possible?
- if you add the keyword static to a class does that make every methods in
that class static? or is this not allowed?
I've seen code where it like
public class Cat
....
....
just like a normal class
when it instantiates the class, it adds the static keyword
static Cat c = new Cat();
What does this mean? how is this different from a static class?
Thanks for clearing up some confusions
Tem