what is difference between const, static and readonly?
Answers were Sorted based on User's Feedback
Answer / magesh
const variable : const can never be modified and
must be initialized to a compile time constant.
Static variable : you received last updated value, when u
getting value for static variable.
Readonly variable : The readonly variable can be changed
inside the constructor.
| Is This Answer Correct ? | 7 Yes | 0 No |
Answer / amit manekar
The difference is that static read-only can be modified by
the containing class, but const can never be modified and
must be initialized to a compile time constant. To expand on
the static read-only case a bit, the containing class can
only modify it:
in the variable declaration (through a variable initializer).
in the static constructor (instance constructors if it's not
static).
| Is This Answer Correct ? | 2 Yes | 1 No |
how we can solve machine key error in asp.net?
What are user controls?
What are the various types of cookies in asp.net?
What are the differences between primary foreign and unique keys?
How to convert a string into an Integer in ASP.net?
Which object is used to encapsulate the state of the client and the browser in ASP.NET?
0 Answers Sans Pareil IT Services,
What is Virtual path in ASP.Net
how we declare interface
What is the name of the process the browser uses to find the address of a web server? a) DMZ b) DNS c) Active Directory d) Database lookup
What is a multilingual website?
In asp.net, if a webpage seems too slow to load completely in th ebrowser. In this case what are the checkings or actions you will take to rectify the slowness or which are the factors related to this issue? How we can trace it?
what do you mean software devlopment ?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)