Answer:
Static
1. Static member is a reference type.
2.Variable set at run time.
3.Static member can be accessed without creating instance of the class or can be
changed from many location.
Const
1.Cost member is a value type.
2.Variable set at compile time.
3.It can't be changed in the application creating instance of the class or can be anywhere else in the code.
Asked In: Many Interviews |
Alert Moderator