Hey everyone, I have a few tables in my database and they all contain a different inherited type of a DataRow.
In addition I have a class that is supposed to handle some things in my DataGrid (My database Tables are connected to DataGrids).
In order to do that, one of the methods in this DataGrid handler has to cast the rows to the exact inherited type of a DataRow.
something like this: (TempDataRow as DataRowTypeThatInheritsFromRegularDataRow).SpecialParameter = something;
In order to do that, I have to pass the method the inherited DataRow type, so it will know how to do the casting.
The method will generally look like this:
public void DoSomthing(DataRowType Type) { (TempDataRow as Type).SpecialParameter = something; }
the thing is I don't know how to pass the type. Regular 'Type' type does not compile. and if I pass just 'DataRow' it won't know how to do the casting.
any suggestions? Thanks.