Get Set property - access modifier
- From: Eran.Yasso@xxxxxxxxx
- Date: 29 Mar 2007 04:58:21 -0700
Hi All,
this issue curious me for long time.
Any one knows why Microsoft didn't allow to different access modifier
for set and get?
To be more specific, why didn't they allow us to do it like this?
static string CSVFileName
{
public get { return _CSVFileName; }
private set { _CSVFileName = value; }
}
In this way I don't need to set different property or add function.
Thanks.
.
- Follow-Ups:
- Re: Get Set property - access modifier
- From: Peter Bradley
- Re: Get Set property - access modifier
- From: PhilipDaniels
- Re: Get Set property - access modifier
- From: Jon Skeet [C# MVP]
- Re: Get Set property - access modifier
- From: Marc Gravell
- Re: Get Set property - access modifier
- Prev by Date: Re: Typed DataSets in VS2005
- Next by Date: Re: Get Set property - access modifier
- Previous by thread: Calling function with pointer from a C like dll into a C# program.
- Next by thread: Re: Get Set property - access modifier
- Index(es):