Math.NET Numerics
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

44 lines
1.0 KiB

using System.Globalization;
#if NET40
namespace System.Runtime.CompilerServices
{
internal class FormattableStringFactory
{
public static FormattableString Create(string format, params object[] args)
{
return new FormattableString(format, args);
}
}
}
namespace System
{
internal class FormattableString
{
private readonly string format;
private readonly object[] args;
public FormattableString(string format, object[] args)
{
this.format = format;
this.args = args;
}
public static string Invariant(FormattableString messageFormat)
{
return messageFormat.ToString(CultureInfo.InvariantCulture);
}
public string ToString(IFormatProvider formatProvider)
{
return string.Format(formatProvider, format, args);
}
public override string ToString()
{
return string.Format(format, args);
}
}
}
#endif