what is difference between const, static and readonly?
Answer Posted / 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 |
Post New Answer View All Answers
What is server side in asp.net?
What is session in web technology?
What are sessions used for?
Can we set which type of comparison we want to perform by the CompareValidator control?
What is the default Orientation property in a Menu control?
What is the difference between mvc and asp.net? : Asp.Net MVC
Hello, Using Visual Studio 2005 (VB) I am working to create a Web Site implementing the following: Within a gridView I have placed a dropdownlist control with a DataSourceID="SDSLkupList". SDSLkupList is a sqlDataSource used to store a lookup list for dropdownlist translation from ID to text. SDSLkupList contains the translation text and other fields related to the dropdown selection ID. (Thought it would be efficient to get everything at the same time.) I would like to provide the user the ability to select from the dropdownlist and, based on the selection, use labels to list related columns stored on the SDSLkupList in separate gridView columns. I have read that SqlDataSources are not meant to be used for individual controls. Since SDSLkupList contains all related information, is there a way to do a find using the dropdownlist selectedValue? (I was not able to discover one.) Otherwise, what should I use? It would need to set the labels on the gridView DataRowBound event as well as the SelectedIndexChanged events. Has anyone done this? Any help would be appreciated. Thanks in Advance. Neal
Do you know caching feature?
How can we use Web API with ASP.NET Web Form?
What is the advantage of mvc over asp.net? : Asp.Net MVC
What does occur first in ASP.Net, Authentication or Authorization?
What is the sequence in which ASP.NET events are processed?
Where session variables are stored?
Can we override the enablepartialrendering property of the scriptmanager class?
What is the caspol.exe tool used for?