Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

NewLine... where is it?


  • Please log in to reply
6 replies to this topic

#1 Moskus

Moskus

    Advanced Member

  • Members
  • PipPipPip
  • 132 posts
  • LocationNorway

Posted 04 September 2011 - 08:21 PM

I want to write and read text from files. However, doing that is much harder when I can't do a simple thin as writing a NewLine character.

Or perhaps I am missing something?
(Hopefully I am missing someting... Posted Image)

#2 Nevyn

Nevyn

    Advanced Member

  • Members
  • PipPipPip
  • 1072 posts
  • LocationNorth Yorkshire, UK

Posted 04 September 2011 - 09:14 PM

I want to write and read text from files. However, doing that is much harder when I can't do a simple thin as writing a NewLine character.

Edit - Chris already replied.

Edited by Nevyn, 04 September 2011 - 09:16 PM.

To be or not to be = 0xFF

 

Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life

Follow @nevynuk on Twitter


#3 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 04 September 2011 - 09:14 PM

Hi Moskus,

I want to write and read text from files. However, doing that is much harder when I can't do a simple thin as writing a NewLine character.

Or perhaps I am missing something?
(Hopefully I am missing someting... Posted Image)

In Visual Basic, just type "Constants.vbCrLf".

You can also add the line "Imports Microsoft.VisualBasic.Constants" to the top of your code file...and then just use the shorter "vbCrLf".

I'll see if we can update the project files in the NETMF 4.2 SDK to automatically infer the Constants include.

Chris

#4 Moskus

Moskus

    Advanced Member

  • Members
  • PipPipPip
  • 132 posts
  • LocationNorway

Posted 05 September 2011 - 06:38 AM

Under constants! I was looking for Controlchars, and finally just searched the .NET Micro Framework for "NewLine". Nothing!
I figured vbCrLf was long gone...


Thank you! I was even starting to look for the old Chr(10) + Chr(13) option... ;)

#5 Fred

Fred

    Advanced Member

  • Members
  • PipPipPip
  • 302 posts
  • LocationUK

Posted 05 September 2011 - 09:00 AM

I normally use \r\n escape characters

#6 Moskus

Moskus

    Advanced Member

  • Members
  • PipPipPip
  • 132 posts
  • LocationNorway

Posted 05 September 2011 - 09:28 AM

I normally use \r\n escape characters

Yes, but that just works for C#... :)

#7 Fred

Fred

    Advanced Member

  • Members
  • PipPipPip
  • 302 posts
  • LocationUK

Posted 05 September 2011 - 04:10 PM

Sorry - I didn't notice this was in the Visual Basic section. I always use the "New Posts" link.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.