Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How is a property designated as read-only?

Answer Posted / deep

In VB.NET:
Private mPropertyName as DataType
Public ReadOnly Property PropertyName() As DataType
Get Return mPropertyName
End Get
End Property
In C#
Private DataType mPropertyName;
public returntype PropertyName
{
get{
//property implementation goes here
return mPropertyName;
}
// Do not write the set implementation
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Elements of CAS

2236


What are the advantages of .net?

1063


Explain me how does linq work?

1252


Is atl redundant in the .net world?

1043


What is cyclomatic complexity and why is it important?

2471


What is .net technology?

1095


What is dot net architecture?

1143


What are the authentication methods in .net?

1084


What is common language specification (cls)?

1138


Describe session handling in a webform, how does it work and what are the limitations?

1092


What is close method? How its different from finalize and dispose?

1060


Explain clr, cts and cls?

1149


Please explain what is reflection and what is it for?

985


What are the differences between user control and server control?

1171


Explain what is the difference between odbc and ado?

1180