32
Answers

Static Extension Methods Already Exist Error:

Photo of David Smith

David Smith

10y
1.2k
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)