What is the C# equivalent of the VB Chr() Funtion?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can anyone tell me what the C# equivalent of the VB Chr() Function? I need to
insert a single-byte character into a label control at run time. For example:

Dim s = "Hello" + Chr(32)
 
Hi,

To convert normal ASCII characters, the equivalent of Chr() in C# is to type
cast. i.e. if you using chr(97) in VB.NET to achieve the same in C# you use
char(97).

Hope this helps...

Regards,
Madhu

MVP - C# | MCSD.NET
 
Make that (char)97.

--Bob

Madhu said:
Hi,

To convert normal ASCII characters, the equivalent of Chr() in C# is to
type
cast. i.e. if you using chr(97) in VB.NET to achieve the same in C# you
use
char(97).

Hope this helps...

Regards,
Madhu

MVP - C# | MCSD.NET
 
Back
Top