Not sure if I worded this correctly ... but I have the following code:
public Guid ItemId
{
get;
}
public TransactionItem()
{
this.ItemId = Guid.Empty;
}
Naturally I am getting a read-only issue ... which I do understand. Is there anyway to set this property value without having to do something like the below:
Guid _itemId = Guid.Empty;
public Guid ItemId
{
get
{
return _itemId;
}
set
{
_itemId = value;
}
}
or
public Guid ItemId
{
get;
internal set;
}
Thanks in advance!