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

How will you do redo and undo in textbox control?

1038


What are the improvements made in cas in .net 4.0?

953


Explain how does assembly versioning work?

1003


Explain what does managed mean in the .net context?

963


What are virtual destructures?

1067


What is the difference between a debug and release build?

1247


What is singleton activation mode in .net?

1137


What are data types in .NET?

1143


What is .net environment?

1087


How to produce an assembly?

1076


Tell about your technical profile ?

3563


What does mean by .net framework?

1131


What is the reason of occurring overflow-underflow arithmetic exception error, it shows error message when we run our program by adding control?

946


I'm having some trouble with cas. How can I troubleshoot the problem?

996


How will you make .NET programs work in Linux ?

2007