Message 1 of 6
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to prepare some of my old code for the deprecation of ParameterType. Within that old code I obtained some data on Shared Parameters including the ParameterType:
ParameterElement paramElem = elem as ParameterElement;
SharedParameterElement sharedParamElem = paramElem as SharedParameterElement;
Definition def = sharedParamElem.GetDefinition();
ParameterType DataType = def.ParameterType;
This is then stored within a class list "ExistingSharedParameters" and contains:
public class ExistingSharedParam
{
........
public ParameterType DataType { get; set; }
........
}
I believe this can be updated as follows:
ParameterElement paramElem = elem as ParameterElement;
SharedParameterElement sharedParamElem = paramElem as SharedParameterElement;
Definition def = sharedParamElem.GetDefinition();
ForgeTypeId DataType = def.GetDataType();
public class ExistingSharedParam
{
.......
public ForgeTypeId DataType { get; set; }
.......
}
I Currently displayed these ParameterType within a DataGridView as below:
SharedParamDGV.Rows.Add(DataType);
However I am unable to display the ForgeTypeId as a meaningful string i.e. Length etc.
I am sure it will be a very simple answer but I am just not seeing it.
Any assistance much appreciated.
Solved! Go to Solution.