Display: Cloud | List
Most Popular Tags
Results (10 total) All > tostring (x)
First sample - recoded in PowerShell (Custom Numeric Format Strings)
[double] $value = 123;$value.ToString("00000")# Displays 00123$value = 1.2;$value.ToString("0.00", [System.Globalization.CultureInfo]::InvariantCulture)# Displays 1.20$value.ToString("00.00",[System.Globalization.CultureInfo]::InvariantCulture)# Displays 01.20$value.ToString("00.00", [System.Globalization.CultureInfo]::CreateSpecificCulture("da-DK")) # Displays 01,20$value = .56$val
Last modified by Thomas Lee on 8/7/2012 5:58:28 PM
To display a date format string that's made up of multiple standard date formats you can specify the following syntax:"{0:d} {0:t}"This will display the short date pattern followed by the short time pattern.If you were to try "d t" this would be interpretted as a custom date format and so would display the day of year followed by the first character of the am/pm designator.
Last modified by Gwynn on 8/18/2009 6:39:19 PM
.NET Framework Developer's GuideStandard Date and Time Format StringsUpdated: July 2009A standard date and time format string uses a single format specifier to define the text representation of a date and time value that is produced by a formatting operation. Any date and time format string that contains more than one character, including white space, is interpreted as a custom date and time forma
Last modified by Microsoft on 2/26/2010 10:06:28 PM
.NET Framework Developer's GuideStandard Numeric Format StringsUpdated: October 2009Standard numeric format strings are used to format common numeric types. A standard numeric format string takes the form Axx, where A is an alphabetic character called the format specifier, and xx is an optional integer called the precision specifier. The precision specifier ranges from 0 to 99 and affects the numb
Last modified by Microsoft on 2/26/2010 10:06:28 PM
.NET Framework Class LibraryIFormattable Interface MembersUpdated: April 2009Provides functionality to format the value of an object into a string representation.Namespace:   SystemAssembly:  mscorlib (in mscorlib.dll) <ComVisibleAttribute(True)> _ Public Interface IFormattable Dim instance As IFormattable [ComVisibleAttribute(true)] public interface IFormattable [ComVisible
Last modified by Microsoft on 2/27/2010 12:12:55 AM
.NET Framework Developer's GuideFormatting OverviewUpdated: July 2009Formatting is the process of converting an instance of a class, structure, or enumeration value to its string representation, often so that the resulting string can be displayed to users or deserialized to restore the original data type. This conversion can pose a number of challenges:The way that values are stored internally doe
Last modified by Microsoft on 2/26/2010 10:06:28 PM
You can also implement IComparable and IComparable(Of YourType), they will provide you easy sorting via Array.Sort(yourArray) or yourList.Sort() If you want your item to be comparable with familiar type (e.g. ColoredPoint with ColoredPointF), you should make deeper analysis of concept. What if you accidentally needed these structures to be compared with another by Type? Can't comparab
Last modified by KoNiKuLa on 12/22/2009 4:01:34 PM
ToString Method (XML Schema Definition Tool (Xsd.exe))
the code generated by this tool, doesnt generate to string method?any idea to workaround that
Last modified by aniruddh_chavan on 7/14/2009 3:41:45 PM
Tags:  method  tool  tostring  xsd
ToString is localized (Rect.ToString Method (System.Windows))
The ToString() method does not use the CultureInfo.InvariantCulture and therefore must not always return "X,Y,Width,Height"e.g. on german culture it returns "X;Y;Width;Height".This will cause the Rect.Parse() method to throw an exception. Make sure to use Rect.ToString(CultureInfo.InvariantCulture) if you want to parse the result later on.
Last modified by IAmMartin on 3/24/2009 6:52:49 PM
W3C DateTime format (DateTime.ToString Method (String) (System))
Unfortunately, .NET does not contain a standard format for the W3C-compliant DateTime (see the specification on http://www.w3.org/TR/NOTE-datetime). W3C-compliant string containing date and time are very useful since this is the standard format for many technologies such as Sitemaps, PingBack, RSS and so on. Anyway, there is a vey easy way to create a W3C DateTime string starting from the existi
Last modified by Limited Atonement on 2/24/2010 10:29:43 PM
Tags:  datetime  standard  tostring  utc  w3c
Page view tracker