How do we make a poperty read only?



How do we make a poperty read only?..

Answer / jitender

Suppose we have a property BarColor
the to make it read only use

private string color;

public string BarColor
{
get
{
return(color);
}
} // No need to set it

Is This Answer Correct ?    5 Yes 0 No

Post New Answer

More ASP.NET Interview Questions

What is the equivalent of date() and time() in asp.net?

0 Answers  


What are client activated objects and server activated objects?

0 Answers  


Explain how do you validate the controls in an asp .net page?

0 Answers  


What is strong-typing versus weak-typing? Which is preferred? Why?

2 Answers  


What is the meaning of TestApi?

0 Answers  






what is CLR?

3 Answers   PrimeLine,


In Code-Behind class which kind of code (server or client) is found ?

0 Answers   Siebel,


What is the difference between rest and restful?

0 Answers  


How we can force all the validation controls to run?

0 Answers  


WHT IS DIFFERENCES BETWEEN HTML CONTROLS AND SERVER CONTROLS.

11 Answers   HCL, Microsoft,


Types of objects in ASP?

8 Answers   Beget, Microsoft,


Which tab of the web site administration tool do you use to manage application setting ,debug and tracing?

2 Answers  


Categories