In C# ,is there any similar to "vbCrLf" in visual basic ?

When I manipulate with a string , i dont know the way similar to "vbCrlf" in visual basic .

Please help me a little , thank you very much.Maybe its easy for many people here.




Answer this question

In C# ,is there any similar to "vbCrLf" in visual basic ?

  • Martin Miles

    ahh yeah. . . thats right. . . vbNewLine is platform agnostic . . . right

  • Sanjay jha

    Blair Allen Stark wrote:
    System.Environment.NewLine

    Thank you indeed , it works !



  • nikero

    Yes, but vbCrLf isn't, so you may or may not want to convert vbCrLf to System.Environment.NewLine. It depends on what the context of the original vbCrLf.

    David Anton
    www.tangiblesoftwaresolutions.com
    Instant C#: VB to C# Converter
    Instant VB: C# to VB Converter
    Instant C++: C# to C++ and VB to C++ Converter
    Instant J#: VB to J# Converter
    Clear VB: Cleans up VB code
    Clear C#: Cleans up C# code



  • tstubb

    I think that this is that you need. :)

    System.Environment.NewLine

  • CLPMAN

    Isnt System.Environment.NewLine platform agnostic

  • Predator14567

    Actually, I can't find anywhere in the VB documentation that says it's platform agnostic - strange.

    David Anton
    www.tangiblesoftwaresolutions.com
    Instant C#: VB to C# Converter
    Instant VB: C# to VB Converter
    Instant C++: C# to C++ and VB to C++ Converter
    Instant J#: VB to J# Converter
    Clear VB: Cleans up VB code
    Clear C#: Cleans up C# code



  • ErikF

    System.Environment.NewLine

  • Brijesh Kumar

    You can also use "\r\n" or "\n", which will give you a new line. From the .NET online documentation:

    A string containing "\r\n" for non-Unix platforms, or a string containing "\n" for Unix platforms.


  • In C# ,is there any similar to "vbCrLf" in visual basic ?