I have the following:
public class Content {
public string PartitionKey { get; set; }
public string RowKey { get; set; }
...
}
public class ContentViewModel
{
public string RowKey { get; set; }
public Content Content { get; set; }
public Boolean UseRowKey { }
}
Can someone tell me how I can code in for UseRowKey to be read only and for it to return true if the Content.RowKey first character is “X”.
You can not because classes have no return value, only methods have (and properties – the get method is a special case of method).
Now:
But that is NOT “returning boolean from a class”, you know.
(untested, you may have to debug)
Read only: do not provide a set.
First char X: programming.