I have a C# code of an assembly which fails to build in visual studio. After some research I found out all these errors are caused by <, > and $ symbols. Analyzing the assembly in .NET reflector turns out these parts of the code were created by the compiler. Here is a bit of code with these errors
private System.Collections.IEnumerator Register(string name, string password, string password2, string email)
{
LoginFengKAI.<Register>c__Iterator2 <Register>c__Iterator = new LoginFengKAI.<Register>c__Iterator2();
<Register>c__Iterator.name = name;
<Register>c__Iterator.password = password;
<Register>c__Iterator.password2 = password2;
<Register>c__Iterator.email = email;
<Register>c__Iterator.<$>name = name;
<Register>c__Iterator.<$>password = password;
<Register>c__Iterator.<$>password2 = password2;
<Register>c__Iterator.<$>email = email;
<Register>c__Iterator.<>f__this = this;
return <Register>c__Iterator;
}
Here i get two error for every <Register>
for using the < and > symbols and three errors for every <$>
for using <, $ and > symbols.
What do you think might cause these errors?