i want display a given number into Rupees Format
Like
Given number is : 156735
my Expected output is 1,56,735.
how to display?
Answers were Sorted based on User's Feedback
Answer / amarendra kala
For oracle.............
select to_char(156735,'999,99,999.') from dual
output:- 1,56,735.
| Is This Answer Correct ? | 6 Yes | 1 No |
Answer / ambrish
Dim Number As Double = 156735.0
Dim info As System.Globalization.CultureInfo =
System.Globalization.CultureInfo.GetCultureInfo("hi-IN")
Dim str As String = Number.ToString("C2", info)
TextBox1.Text = str
| Is This Answer Correct ? | 5 Yes | 0 No |
Answer / esarmca65
For win forms .....
private void button1_Click(object sender, EventArgs e)
{
string s = textBox1.Text;
textBox2.Text = string.Format("{0:c}",
Convert.ToInt32(s));
}
Input: 65536
Out Put:$65,536.00
| Is This Answer Correct ? | 5 Yes | 3 No |
Answer / varun
try the below statment. It uses the indian english culture
to represent the numbers in lakhs instead of millions
format..
Console.WriteLine(i.ToString("#,#",
System.Globalization.CultureInfo.GetCultureInfo("en-IN")));
| Is This Answer Correct ? | 2 Yes | 2 No |
Answer / srikanth
You Can Use Just
String.Format("{0:C}",156735);
| Is This Answer Correct ? | 1 Yes | 6 No |
Answer / jayashree k r
1,56,735 is not a valid number format. you can display as
156,735.
int i = 156735
i.ToString("#,#",
System.Globalization.CultureInfo.InvariantCulture)
will give you the expected result.
| Is This Answer Correct ? | 0 Yes | 5 No |
Are there constructors in c sharp?
What is wpf application in c#?
What operators can be used to cast from one reference type to another without the risk of throwing an exception?
Define using statement in c#?
Explain the serialization in .net
What is a custom attribute?
What are annotations in c#?
Differentiate between sqlclient oledb and providers?
Is java better than c sharp?
An Array is a Ref Type? what about the array elements which are value type(int,Float...etc)?
What is generic method in c#?
Can abstract class be sealed?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)