How to display following format in c# [Resolved]

Posted by Jitendrasoft09 under C# on 6/26/2013 | Points: 10 | Views : 854 | Status : [Member] [MVP] | Replies : 4
Hi All,
I want to understand How to display following format in c#, let me know if anybody knows.
940
+ 73
- -
1013

Jitendra Kumar
If my post helps you, plz mark as an answer.



Responses

Posted by: Raj.Trivedi on: 6/27/2013 [Member] [MVP] Starter | Points: 50

Up
0
Down

Resolved
Hello jitendre

you will have to use new line concept to achieve this

Here is the code

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SampleConsole
{
class Program
{
static void Main(string[] args)
{
string num1 = "940\r\n";
string num2 = "+73\r\n";
string num3 = "---";
string num4 = "1013";
Console.WriteLine(num1);
Console.WriteLine(num2);
Console.WriteLine(num3);
Console.WriteLine(num4);
Console.ReadLine();
}
}
}


Regard's
Raj.Trivedi
"Sharing is Caring"
Please mark as answer if your Query is resolved

Jitendrasoft09, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Raj.Trivedi on: 6/26/2013 [Member] [MVP] Starter | Points: 25

Up
0
Down
Hello Jitendra

How are you trying to achieve it

in Windows or Web

Regard's
Raj.Trivedi
"Sharing is Caring"
Please mark as answer if your Query is resolved

Jitendrasoft09, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jitendrasoft09 on: 6/27/2013 [Member] [MVP] Starter | Points: 25

Up
0
Down
Hi Raj,
It will be in c# console application.....

Jitendra Kumar
If my post helps you, plz mark as an answer.

Jitendrasoft09, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jitendrasoft09 on: 6/28/2013 [Member] [MVP] Starter | Points: 25

Up
0
Down
It is working, Thanks Raj.....

Jitendra Kumar
If my post helps you, plz mark as an answer.

Jitendrasoft09, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response