Here is the code I am using:
private static WeightRecordsDataSource sharedDataSource;
public static WeightRecordsDataSource SharedDataSource
{
get
{
if (sharedDataSource == null)
sharedDataSource = new WeightRecordsDataSource();
return sharedDataSource;
}
}
However, every time SharedDataSource is called, the sharedDataSource is found to be null! and hence a new WeightRecordsDataSource
is called. What am I doing wrong?