Archive of News about Google, Technology News,Technical News, Business News, Medical News, and Software Testing News
Friday, September 17, 2010
iformatprovider
Setting iformatprovider , how to use iformatprovider , managing iformatprovider , iformatprovider
Tutorial of iformatprovider, using iformatprovider, admin the iformatprovider, news of iformatprovider
iformatprovider To display a value as currency using the format of the culture of the local machine iformatprovider. I have a little sample that I managed to get working. Here for you iformatprovider :
In C#:
using System;
using System.Globalization;
namespace ConsoleApplication1
{
class Class1
{
[STAThread]
static void Main(string[] args)
{
NumberFormatInfo numberInfo = CultureInfo.CurrentCulture.NumberFormat;
double myAmount = 10.815;
Console.WriteLine(Math.Round(myAmount, 2).ToString("c", numberInfo));
Console.ReadLine();
}
}
}
In VB:
Imports System.Globalization
Module Module1
Sub Main()
Dim numberInfo As NumberFormatInfo = CultureInfo.CurrentCulture.NumberFormat
Dim myAmount As Double = 10.815
Console.WriteLine(Math.Round(10.815, 2).ToString("c", numberInfo))
Console.ReadLine()
End Sub
End Module
Okay, thats for iformatprovider
i hope the tutorial iformatprovider or news iformatprovider or document of iformatprovider can usefull for your iformatprovider
Labels:
Technology News,
Tutorial
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment