How to Fix C# Error - Identifier too long

Posted by Shubham under C# category on | Points: 40 | Views : 1683
This error you will get when you try to declare a variable of length more than 512 chars. The below code will produce a compile time error: Identifier too long

using System;

class too_long_class
public static void Main()
int intsssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss = 0;

To fix above error just reduce the number of char in variable name less than 512......

Comments or Responses

Posted by: T.Saravanan on: 3/6/2012 Level:Silver | Status: [Member] [MVP] | Points: 10
what is the purpose of this code?

Which one is declare variable length more than 512?
Posted by: Gow.Net on: 3/10/2012 Level:Starter | Status: [Member] | Points: 10
sir how to work this code? and what the use?
Posted by: Shubham on: 3/10/2012 Level:Starter | Status: [Member] | Points: 10
this code is only to know how 's compile time error has worked...
nd this code for those student who has new in .net
ok.... thank u....

Login to post response