Special characters

V

Vannela

In my unmamaged code varaibles declaration can use special
characters like
- Dash
_ Underscore (C# allows except this)
$ Dollar sign
# Number sign
% Percent sign
but C# will not allow how can i replace this characters
with other ones like cant dlete this charates from those
variables bcoz
if a variable by name "san#thu " exists and if i delete
this # from this variable then there can be other variable
by name "santhu " so both conflicts so how can i replace
these variable with the other ones?

Thank you
Vannela
 
J

Jon Skeet [C# MVP]

Vannela said:
In my unmamaged code varaibles declaration can use special
characters like
- Dash
_ Underscore (C# allows except this)
$ Dollar sign
# Number sign
% Percent sign
but C# will not allow how can i replace this characters
with other ones like cant dlete this charates from those
variables bcoz
if a variable by name "san#thu " exists and if i delete
this # from this variable then there can be other variable
by name "santhu " so both conflicts so how can i replace
these variable with the other ones?

I would suggest just renaming them by hand to variables which still
make semantic sense but which don't include those characters. I don't
think they're necessary for readability purposes anyway.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top