RE: Character representation

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Madhu[C#-MVP] (MadhuCMVP_at_discussions.microsoft.com)
Date: 10/08/04


Date: Fri, 8 Oct 2004 09:01:03 -0700

Hi,

The representation for some of the special characters in c# are as follows,
\t for Tab
\r for Carriage Return
\n for new line

Also, for converting character to ASCII and vise versa...

try using Convert.ToInt32(char) and Convert.ToChar(int) respectively...

Hope this helps...

Regards,
Madhu

MVP-C# | MCSD.NET

"Gas" wrote:

> Hi,
>
> I am wondering how can I representation some of the specical characters in
> C#?
> (for example, we use vbKeyTab for Tab and vbCrLf for line feed in VB)
>
> Also is there any character to ASCII code and ASCII code to character
> built-in function in C#?
>
> thanks
>
> Gas
>
>
>



Relevant Pages

  • Re: Formatting index entries
    ... replace each space with a tab character ... Copy the whole cell ... use Edit>Replace to replace every tab with a space. ... you want to rip all the Index tags out of the main document. ...
    (microsoft.public.mac.office.word)
  • Re: Calculations Result Sometimes Displays 000, Sometimes 444
    ... > when I was addressing your mention of strange formatting options, ... the fill character for each tab was set to 4 on one of the ... added to a layout (not duplicate or copy / paste) will automatically ...
    (comp.databases.filemaker)
  • Re: Renaming documents from text within the document using existin
    ... StrName = ActiveDocument.Paragraphs.Range.Text ... character was found because you did trim off the first six characters. ... You can use the replace command to remove tab characters from a string and I ...
    (microsoft.public.word.vba.general)
  • Re: How Tabs In Memos Work
    ... so your best option is to parse each line character ... > memo lines contain tab characters. ... width of the system font. ... while using div 2 does. ...
    (borland.public.delphi.language.objectpascal)
  • Re: grep for metacharacters
    ... tab character. ... if you want to stick with grep, ... formfeed character in a file and match based on that: ... And egrep in RHEL5 doesn't see _any_ of them: ...
    (linux.redhat)