I am trying such code, but this code is marked by VS as error. I want to pass class as a parameter to the method. Is any way to do it properly?
public string MyMethod(Object dataObject, Type dataType)
{
if (dataObject is dataType obj)
{
//some code here
}
}