To the string culture invariant. - CSharp System.Globalization

CSharp examples for System.Globalization:Country

Description

To the string culture invariant.

Demo Code


using System.Text.RegularExpressions;
using System.Globalization;
using System;//from w ww.j av a2  s  . c om

public class Main{
        /// <summary>
        /// To the string culture invariant.
        /// </summary>
        /// <param name="val">The value.</param>
        /// <returns>System.String.</returns>
        public static string ToStringCultureInvariant(double val)
        {
            return val.ToString(CultureInfo.InvariantCulture);
        }
        /// <summary>
        /// To the string culture invariant.
        /// </summary>
        /// <param name="val">The value.</param>
        /// <returns>System.String.</returns>
        public static string ToStringCultureInvariant(long val)
        {
            return val.ToString(CultureInfo.InvariantCulture);
        }
        /// <summary>
        /// To the string culture invariant.
        /// </summary>
        /// <param name="val">The value.</param>
        /// <returns>System.String.</returns>
        public static string ToStringCultureInvariant(int val)
        {
            return val.ToString(CultureInfo.InvariantCulture);
        }
}

Related Tutorials