I am very new to generics and trying to implement it. How can i use it here.
private T returnValueFromGrid(int RowNo, int ColNo)
{
return (T) dgvCurrencyMaster.Rows[RowNo].Cells[ColNo].Value;
}
I am trying to convert below value to generic type and then return it.
dgvCurrencyMaster.Rows[RowNo].Cells[ColNo].Value
Here i need to know two things. How to do the above problem and how to use this in my code. Please provide some eg.
EDIT
It is giving me error Error The type or namespace name 'T' could not be found (are you missing a using directive or an assembly reference?