32
Answers

Static Extension Methods Already Exist Error:

David Smith

David Smith

9y
831
1

I am trying to overload in my static method, I am getting an error that method already exist, how to fix this issue?


public static int GetValue(this DataTable datatable, int rowindex, string columnName)
{
return 0;
}

public static double GetValue(this DataTable datatable, int rowindex, string columnName)
{
return 0.0;
}

public static decimal GetValue(this DataTable datatable, int rowindex, string columnName)
{
return (decimal)0.0;
}

public static float GetValue(this DataTable datatable, int rowindex, string columnName)
{
return (float)0.0;
}
Answers (32)