Hi I`m just starting to work whit SnapDevelop and .net DataStore, while learning C# as well. I'm trying to get the column type from my Generic type DataStore , has anyone out there have an example on how to do this.
So far I can get the column name but not the type.
Here's is how I get the column name
var columns = dataStore.DwMeta.Columns;
foreach (var item in columns)
{
Console.WriteLine("Column ID: {0}, Column Name: {1},{2}", item.ID, item.Name);
}
Thanks in advance, Daniel
if (Nullable.GetUnderlyingType(prop.PropertyType) is var uType && uType != null)
{
var nullableTypeName = uType.Name;
Console.WriteLine(nullableTypeName);
}
You mentioned you're using a Generic .NET DataStore, correct?
That means you already have a model class through which you access the .NET DataStore, you can safely retrieve the DataWindow's columns (without caring for their particular type) through the model itself. Is there a specific reason why this approach is not fit for you?
Regards,
Francisco