Compiler Error CS0102
The type 'type name' already contains a definition for 'identifier'
A class contains multiple declarations for identifiers with the same name at the same scope. To fix the error, rename the duplicate identifiers.
Example
The following sample generates CS0102.
// CS0102.cs
// compile with: /target:library
namespace MyApp
{
public class MyClass
{
string s = "Hello";
string s = "Goodbye"; // CS0102
public void GetString()
{
string s = "Hello again"; // method scope, no error
}
}
}
Sarađujte sa nama na GitHub-u
Izvor za ovaj sadržaj možete da pronađete u usluzi GitHub, gde možete i da kreirate i pregledate probleme i povučete zahteve. Više informacija potražite u našem vodiču za saradnike.
Povratne informacije
https://aka.ms/ContentUserFeedback.
Stiže uskoro: Tokom 2024. godine postepeno ćemo ukidati probleme sa uslugom GitHub kao mehanizam povratnih informacija za sadržaj i zameniti ga novim sistemom povratnih informacija. Dodatne informacije potražite u članku:Prosledite i prikažite povratne informacije za