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

how many session modes are available?some brief explnation

1 Answers  


Describe the method to create a permanent cookie?

0 Answers   Siebel,


What is session handling in a webfarm, how it can work with its limits?

0 Answers   Siebel,


Explain the difference between debug.write and trace.write? When should each be used?

0 Answers  


Why does a user need nothing more than a Web browser to view ASP.NET pages?

1 Answers  






what is the difference b/w .net 1.1 and 2.0 ?

2 Answers   Polaris,


What is view state and how this can be done and was this there in asp?

11 Answers   Accenture, KDOT, Mphasis,


What is an assembly? Explain its parts.

0 Answers  


Can I read the hard disk serial # of the client computer using asp.net?

0 Answers  


Explain the use of dataadapter.

0 Answers  


what are the main advantage in .net?

4 Answers   TCS,


What is the difference between debug and release?

0 Answers  


Categories