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

printing message in netduino


Best Answer JerseyTechGuy, 12 April 2013 - 01:27 PM

I haven't come across any pre-written replacements for it.  You can create your own method to simulate it.  Here's some simple pseudo code to give you an idea.  You would then in this example call MyConsole.WriteLine("{0}, object)

 

public class MyConsole{    public static void WriteLine(string format, Object arg0)    {        /// Write your parsing code here    }}
Go to the full post


  • Please log in to reply
3 replies to this topic

#1 Turkem

Turkem

    New Member

  • Members
  • Pip
  • 5 posts

Posted 12 April 2013 - 12:36 AM

Hi, 

 

I am new in Netduino community,I have got little problems in here.I know that you can print a message with Debug.Print("message"). However I want to print smt like Console.WriteLine("{0}" object) allows us to do in C#, I mean method that takes two parameters but as I understood Debug.Print() doesn't take two parameters. Pls help!



#2 Nevyn

Nevyn

    Advanced Member

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

Posted 12 April 2013 - 12:07 PM

However I want to print smt like Console.WriteLine("{0}" object) allows us to do in C#, I mean method that takes two parameters but as I understood Debug.Print() doesn't take two parameters. Pls help!

You will have to do something like:

 

 

Debug.Print("Data: " + myIntValue.ToString + ", " + myStringValue);

 

Regards,

Mark


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 JerseyTechGuy

JerseyTechGuy

    Advanced Member

  • Members
  • PipPipPip
  • 870 posts

Posted 12 April 2013 - 01:27 PM   Best Answer

I haven't come across any pre-written replacements for it.  You can create your own method to simulate it.  Here's some simple pseudo code to give you an idea.  You would then in this example call MyConsole.WriteLine("{0}, object)

 

public class MyConsole{    public static void WriteLine(string format, Object arg0)    {        /// Write your parsing code here    }}


#4 Turkem

Turkem

    New Member

  • Members
  • Pip
  • 5 posts

Posted 14 April 2013 - 05:41 PM

thanks a lot for your help!






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.