Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



i want display a given number into Rupees Format Like Given number is : 156735 my Expected ou..

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

i want display a given number into Rupees Format Like Given number is : 156735 my Expected ou..

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

i want display a given number into Rupees Format Like Given number is : 156735 my Expected ou..

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

i want display a given number into Rupees Format Like Given number is : 156735 my Expected ou..

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

i want display a given number into Rupees Format Like Given number is : 156735 my Expected ou..

Answer / srikanth

You Can Use Just
String.Format("{0:C}",156735);

Is This Answer Correct ?    1 Yes 6 No

i want display a given number into Rupees Format Like Given number is : 156735 my Expected ou..

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

Post New Answer

More C Sharp Interview Questions

Are there constructors in c sharp?

0 Answers  


What is wpf application in c#?

0 Answers  


What operators can be used to cast from one reference type to another without the risk of throwing an exception?

0 Answers  


Define using statement in c#?

0 Answers  


Explain the serialization in .net

0 Answers  


What is a custom attribute?

0 Answers  


What are annotations in c#?

0 Answers  


Differentiate between sqlclient oledb and providers?

0 Answers  


Is java better than c sharp?

0 Answers  


An Array is a Ref Type? what about the array elements which are value type(int,Float...etc)?

6 Answers  


What is generic method in c#?

0 Answers  


Can abstract class be sealed?

0 Answers  


Categories