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

When displaying fonts, what is the difference between pixels, points and ems?

1245


What is meant by globalization?

1052


What is lambda expressions in c#?

1183


State some of the different languages supported by .net?

1016


What is .net standard?

1225


Tell us what is heap and what is stack?

1177


What exactly is being serialized when you perform serialization in .net?

1042


What are the new features of Framework 1.1 ?

16684


Explain the difference between .net 2000 and .net 2005(features)? Which one is better?

1029


What is RPC? What is the use of it?

1173


Is .net core installed?

1051


Difference between class and interface in .net?

1071


What are the new 2.0 features useful for?

1211


What data providers available in .net to connect to database?

984


What is the difference between .net 2000 and .net 2005(features)? Which one is better?

979