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

Explain what a diffgram is, and a good use for one?

1 Answers   FT,


What is operator overloading in dotnet

1 Answers  


What is the usie of activex control in .net?

0 Answers  


what is difference between User Control,Custom Contro1,Web server control and template controls

1 Answers  


What is an asp.net validator? And, mention its types.

0 Answers  






Explain asp.net web forms.

0 Answers  


About Windows/Forms Authentication

1 Answers  


What is the maximum length of textbox

1 Answers  


on modify statement, executeNonQuery returns zero rows affected even though there has been modification carried out sucessfully in the table.. can anyone tell me is this possible??? if yes, how..???

1 Answers   ADITI,


what is cross page posting

3 Answers  


What is the flow of processing of the request? : asp.net mvc

0 Answers  


How would one do a deep copy in .NET?

6 Answers   TCS,


Categories