C# Compiler Error
Type ‘class’ already defines a member called ‘member’ with the same parameter types
Reason for the Error
You will receive this error when you declare more than one method/function with the same name and parameter types.
For example, the below code snippet demonstrates the C# compiler error CS0111.
public class DeveloperPublish { void Function1() { } void Function1() { } public static void Main() { } }
Error CS0111 Type ‘DeveloperPublish’ already defines a member called ‘Function1’ with the same parameter types ConsoleApp1 C:\Users\Senthil\source\repos\ConsoleApp1\ConsoleApp1\Program.cs 4 Active
Solution
To fix the above error, rename the function or apply the concept of function overloading.