2 interfaces inheriting from IFormattable
Microsoft.Private.Windows.Core (1)
src\winforms\src\Microsoft.Private.Windows.Polyfills\System\ISpanFormattable.cs (1)
7internal interface ISpanFormattable : IFormattable
System.Private.CoreLib (1)
src\runtime\src\libraries\System.Private.CoreLib\src\System\ISpanFormattable.cs (1)
7public interface ISpanFormattable : IFormattable
65 implementations of IFormattable
Microsoft.CodeAnalysis (9)
CodeAnalysisResourcesLocalizableErrorArgument.cs (1)
12internal readonly struct CodeAnalysisResourcesLocalizableErrorArgument : IFormattable
ConstantValue.cs (1)
39internal abstract partial class ConstantValue : IEquatable<ConstantValue?>, IFormattable
Diagnostic\Diagnostic.cs (2)
21public abstract partial class Diagnostic : IEquatable<Diagnostic?>, IFormattable 604internal abstract class RequiredLanguageVersion : IFormattable
Diagnostic\DiagnosticInfo.cs (1)
26internal class DiagnosticInfo : IFormattable
Diagnostic\LocalizableString.cs (1)
13public abstract partial class LocalizableString : IFormattable, IEquatable<LocalizableString?>
SymbolDisplay\FormattedSymbol.cs (1)
20internal sealed class FormattedSymbol : IFormattable
SymbolDisplay\FormattedSymbolList.cs (1)
16internal sealed class FormattedSymbolList : IFormattable
Symbols\Attributes\AttributeUsageInfo.cs (1)
169private readonly struct ValidTargetsStringLocalizableErrorArgument : IFormattable
Microsoft.CodeAnalysis.CSharp (5)
Errors\MessageID.cs (1)
321internal readonly struct LocalizableErrorArgument : IFormattable
Symbols\Symbol.cs (1)
31internal abstract partial class Symbol : ISymbolInternal, IFormattable
Symbols\SymbolDistinguisher.cs (1)
204private sealed class Description : IFormattable
Symbols\TypeWithAnnotations.cs (1)
22internal readonly struct TypeWithAnnotations : IFormattable
Syntax\CSharpSyntaxNode.cs (1)
24public abstract partial class CSharpSyntaxNode : SyntaxNode, IFormattable
Microsoft.CodeAnalysis.Razor.Compiler (2)
Language\Legacy\LocationTagged.cs (1)
14internal class LocationTagged<TValue> : IFormattable
Language\RazorDiagnostic.cs (1)
10public sealed class RazorDiagnostic : IEquatable<RazorDiagnostic>, IFormattable
Microsoft.Extensions.Compliance.Abstractions.Tests (1)
Redaction\TestFormattable.cs (1)
8internal sealed class TestFormattable : IFormattable
Microsoft.Extensions.Telemetry (1)
Logging\JustInTimeRedactor.cs (1)
21, IFormattable
Microsoft.Extensions.Telemetry.Tests (1)
Logging\JustInTimeRedactorTests.cs (1)
87private sealed class Formattable : IFormattable
Microsoft.Gen.Logging.Generated.Tests (1)
parent\TestClasses\FormattableTestExtensions.cs (1)
20internal struct Formattable : IFormattable
NuGet.Versioning (2)
SemanticVersionBase.cs (1)
12public partial class SemanticVersion : IFormattable, IComparable, IComparable<SemanticVersion>, IEquatable<SemanticVersion>
VersionRange.cs (1)
18public partial class VersionRange : VersionRangeBase, IFormattable
PresentationCore (35)
System\Windows\FontStretch.cs (1)
21public struct FontStretch : IFormattable
System\Windows\FontStyle.cs (1)
18public struct FontStyle : IFormattable
System\Windows\FontWeight.cs (1)
19public struct FontWeight : IFormattable
System\Windows\Media\Animation\KeySpline.cs (1)
17public class KeySpline : Freezable, IFormattable
System\Windows\Media\Animation\RepeatBehavior.cs (1)
24public readonly struct RepeatBehavior : IFormattable
System\Windows\Media\Brush.cs (1)
27public abstract partial class Brush : Animatable, IFormattable
System\Windows\Media\Color.cs (1)
18public struct Color : IFormattable, IEquatable<Color>
System\Windows\Media\Generated\Brush.cs (1)
30public abstract partial class Brush : Animatable, IFormattable, DUCE.IResource
System\Windows\Media\Generated\DoubleCollection.cs (1)
32public sealed partial class DoubleCollection : Freezable, IFormattable, IList, IList<double>
System\Windows\Media\Generated\GeneralTransform.cs (1)
27public abstract partial class GeneralTransform : Animatable, IFormattable
System\Windows\Media\Generated\Geometry.cs (1)
30public abstract partial class Geometry : Animatable, IFormattable, DUCE.IResource
System\Windows\Media\Generated\GradientStop.cs (1)
16public sealed partial class GradientStop : Animatable, IFormattable
System\Windows\Media\Generated\GradientStopCollection.cs (1)
31public sealed partial class GradientStopCollection : Animatable, IFormattable, IList, IList<GradientStop>
System\Windows\Media\Generated\ImageSource.cs (1)
27public abstract partial class ImageSource : Animatable, IFormattable, DUCE.IResource
System\Windows\Media\Generated\Int32Collection.cs (1)
32public sealed partial class Int32Collection : Freezable, IFormattable, IList, IList<int>
System\Windows\Media\Generated\PathFigureCollection.cs (1)
32public sealed partial class PathFigureCollection : Animatable, IFormattable, IList, IList<PathFigure>
System\Windows\Media\Generated\PointCollection.cs (1)
32public sealed partial class PointCollection : Freezable, IFormattable, IList, IList<Point>
System\Windows\Media\Generated\VectorCollection.cs (1)
32public sealed partial class VectorCollection : Freezable, IFormattable, IList, IList<Vector>
System\Windows\Media\PathFigure.cs (1)
15public sealed partial class PathFigure : Animatable, IFormattable
System\Windows\Media3D\Generated\Camera.cs (1)
25public abstract partial class Camera : Animatable, IFormattable, DUCE.IResource
System\Windows\Media3D\Generated\GeneralTransform3D.cs (1)
25public abstract partial class GeneralTransform3D : Animatable, IFormattable
System\Windows\Media3D\Generated\Material.cs (1)
25public abstract partial class Material : Animatable, IFormattable, DUCE.IResource
System\Windows\Media3D\Generated\Matrix3D.cs (1)
29public partial struct Matrix3D : IFormattable
System\Windows\Media3D\Generated\Model3D.cs (1)
25public abstract partial class Model3D : Animatable, IFormattable, DUCE.IResource
System\Windows\Media3D\Generated\Point3D.cs (1)
29public partial struct Point3D : IFormattable
System\Windows\Media3D\Generated\Point3DCollection.cs (1)
30public sealed partial class Point3DCollection : Freezable, IFormattable, IList, IList<Point3D>
System\Windows\Media3D\Generated\Point4D.cs (1)
29public partial struct Point4D : IFormattable
System\Windows\Media3D\Generated\Quaternion.cs (1)
29public partial struct Quaternion : IFormattable
System\Windows\Media3D\Generated\Rect3D.cs (1)
29public partial struct Rect3D : IFormattable
System\Windows\Media3D\Generated\Rotation3D.cs (1)
25public abstract partial class Rotation3D : Animatable, IFormattable, DUCE.IResource
System\Windows\Media3D\Generated\Size3D.cs (1)
29public partial struct Size3D : IFormattable
System\Windows\Media3D\Generated\Vector3D.cs (1)
29public partial struct Vector3D : IFormattable
System\Windows\Media3D\Generated\Vector3DCollection.cs (1)
30public sealed partial class Vector3DCollection : Freezable, IFormattable, IList, IList<Vector3D>
System\Windows\Media3D\Quaternion.cs (1)
34public partial struct Quaternion : IFormattable
System\Windows\Media3D\Rect3D.cs (1)
11public partial struct Rect3D: IFormattable
System.Private.CoreLib (6)
src\runtime\src\libraries\System.Private.CoreLib\src\System\FormattableString.cs (1)
14public abstract class FormattableString : IFormattable
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Vector_1.cs (1)
31public readonly unsafe struct Vector<T> : ISimdVector<Vector<T>, T>, IFormattable
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Vector2.cs (1)
18public partial struct Vector2 : IEquatable<Vector2>, IFormattable
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Vector3.cs (1)
18public partial struct Vector3 : IEquatable<Vector3>, IFormattable
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Vector4.cs (1)
18public partial struct Vector4 : IEquatable<Vector4>, IFormattable
System\Enum.NativeAot.cs (1)
21public abstract partial class Enum : ValueType, IComparable, IFormattable, IConvertible
System.Runtime.Numerics (2)
System\Numerics\Complex.cs (1)
22IFormattable,
System\Numerics\Complex.Generic.cs (1)
20IFormattable,
235 references to IFormattable
Aspire.Hosting (4)
Backchannel\AuxiliaryBackchannelRpcTarget.cs (3)
1428JsonValue jsonValue when jsonValue.TryGetValue<IFormattable>(out var formattableValue) => formattableValue.ToString(null, CultureInfo.InvariantCulture), 1431IFormattable formattable => formattable.ToString(null, CultureInfo.InvariantCulture),
Publishing\ResourceContainerImageManager.cs (1)
530IFormattable formattable => formattable.ToString(null, CultureInfo.InvariantCulture),
Aspire.Hosting.Foundry (1)
HostedAgent\AzureHostedAgentResource.cs (1)
354case IFormattable f:
Aspire.Hosting.Kubernetes (1)
KubernetesResource.cs (1)
518if (value is IFormattable formattable)
Aspire.Hosting.Radius (1)
Publishing\RadiusInfrastructureBuilder.cs (1)
1220case IFormattable formattable:
dotnet-svcutil-lib (6)
FrameworkFork\Microsoft.Xml\Xml\schema\XmlSchemaDatatype.cs (6)
284if (cur is IFormattable) 286bldr.Append(((IFormattable)cur).ToString("", CultureInfo.InvariantCulture)); 296if (cur is IFormattable) 298bldr.Append(((IFormattable)cur).ToString("", CultureInfo.InvariantCulture)); 309else if (value is IFormattable) 311stringValue = ((IFormattable)value).ToString("", CultureInfo.InvariantCulture);
GenerateDocumentationAndConfigFiles (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (1)
127=> compilation.GetTypeByMetadataName(typeof(IFormattable).FullName!);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
246return symbol?.MetadataName is nameof(FormattableString) or nameof(IFormattable)
ILCompiler.Compiler (1)
src\runtime\src\coreclr\tools\Common\System\FormattingHelpers.cs (1)
15public static string ToStringInvariant<T>(this T value, string format) where T : IFormattable
ILCompiler.ReadyToRun (1)
src\runtime\src\coreclr\tools\Common\System\FormattingHelpers.cs (1)
15public static string ToStringInvariant<T>(this T value, string format) where T : IFormattable
ILCompiler.RyuJit (1)
src\runtime\src\coreclr\tools\Common\System\FormattingHelpers.cs (1)
15public static string ToStringInvariant<T>(this T value, string format) where T : IFormattable
ILCompiler.TypeSystem (1)
src\runtime\src\coreclr\tools\Common\System\FormattingHelpers.cs (1)
15public static string ToStringInvariant<T>(this T value, string format) where T : IFormattable
Microsoft.AspNetCore.Components (1)
src\aspnetcore\src\Components\Shared\src\ComponentKeyHelper.cs (1)
35IFormattable formattable => formattable.ToString("", CultureInfo.InvariantCulture),
Microsoft.AspNetCore.Components.Endpoints (2)
Rendering\SSRRenderModeBoundary.cs (1)
282IFormattable formattable => formattable.ToString(null, CultureInfo.InvariantCulture),
src\aspnetcore\src\Components\Shared\src\ComponentKeyHelper.cs (1)
35IFormattable formattable => formattable.ToString("", CultureInfo.InvariantCulture),
Microsoft.AspNetCore.Components.Forms (5)
src\aspnetcore\src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (3)
269else if (typeof(IFormattable).IsAssignableFrom(memberType)) 271var func = CreateMemberEvaluator<IFormattable>(memberExpression); 320case IFormattable formattable:
src\aspnetcore\src\Components\Shared\src\ExpressionFormatting\ReverseStringBuilder.cs (2)
103InsertFront((IFormattable)value); 107public void InsertFront(IFormattable formattable)
Microsoft.AspNetCore.Components.QuickGrid (4)
Columns\PropertyColumn.cs (4)
28/// Using this requires the <typeparamref name="TProp"/> type to implement <see cref="IFormattable" />. 56if (!typeof(IFormattable).IsAssignableFrom(nullableUnderlyingTypeOrNull ?? typeof(TProp))) 58throw new InvalidOperationException($"A '{nameof(Format)}' parameter was supplied, but the type '{typeof(TProp)}' does not implement '{typeof(IFormattable)}'."); 61_cellTextFunc = item => ((IFormattable?)compiledPropertyExpression!(item))?.ToString(Format, null);
Microsoft.AspNetCore.Components.Web (5)
src\aspnetcore\src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (3)
269else if (typeof(IFormattable).IsAssignableFrom(memberType)) 271var func = CreateMemberEvaluator<IFormattable>(memberExpression); 320case IFormattable formattable:
src\aspnetcore\src\Components\Shared\src\ExpressionFormatting\ReverseStringBuilder.cs (2)
103InsertFront((IFormattable)value); 107public void InsertFront(IFormattable formattable)
Microsoft.AspNetCore.Hosting (1)
Internal\HostingRequestStartingLog.cs (1)
71internal static string ValueOrEmptyMarker<T>(T? potentialValue) where T : struct, IFormattable
Microsoft.AspNetCore.Html.Abstractions (1)
HtmlFormattableString.cs (1)
136if (arg is IFormattable formattable)
Microsoft.AspNetCore.Razor.Utilities.Shared (5)
src\roslyn\src\Razor\src\Shared\Microsoft.AspNetCore.Razor.SharedUtilities\Assumed_StringHandlers.cs (5)
34where TValue : IFormattable 59where TValue : IFormattable 84where TValue : IFormattable 108where TValue : IFormattable 135where TValue : IFormattable
Microsoft.Build (2)
BackEnd\Components\BuildRequestEngine\BuildRequestEngine.cs (1)
1544where TValue : IFormattable
BackEnd\Components\Scheduler\Scheduler.cs (1)
2725where TValue : IFormattable
Microsoft.Build.Framework (27)
Assumed.cs (20)
855where TValue : IFormattable 885where TValue : IFormattable 915where TValue : IFormattable 945where TValue : IFormattable 974where TValue : IFormattable 1003where TValue : IFormattable 1033where TValue : IFormattable 1063where TValue : IFormattable 1093where TValue : IFormattable 1123where TValue : IFormattable 1154where TValue : IFormattable 1186where TValue : IFormattable 1217where TValue : IFormattable 1249where TValue : IFormattable 1278where TValue : IFormattable 1307where TValue : IFormattable 1336where TValue : IFormattable 1365where TValue : IFormattable 1395where TValue : IFormattable 1426where TValue : IFormattable
BackEnd\CommunicationsUtilities.cs (1)
779where TValue : IFormattable
Coordinator\ICoordinatorDebugOutput.cs (1)
41where TValue : IFormattable
DebugTrace.cs (1)
76where TValue : IFormattable
Utilities\StringBuilderHelper.cs (3)
40if (value is IFormattable) 53_builder.Append(((IFormattable)value).ToString(format: null, formatProvider: null)); 62where T : IFormattable
Utilities\UnconditionalInterpolatedStringHandler.cs (1)
29where TValue : IFormattable
Microsoft.CodeAnalysis (10)
Diagnostic\Diagnostic.cs (2)
414string IFormattable.ToString(string? ignored, IFormatProvider? formatProvider) 608string IFormattable.ToString(string? format, IFormatProvider? formatProvider)
Diagnostic\DiagnosticInfo.cs (3)
104if (arg is IFormattable) 386return ((IFormattable)this).ToString(null, formatProvider); 389string IFormattable.ToString(string? format, IFormatProvider? formatProvider)
Diagnostic\LocalizableString.cs (1)
52string IFormattable.ToString(string? ignored, IFormatProvider? formatProvider)
InternalUtilities\JsonWriter.cs (2)
116where T : struct, IFormattable 122where T : struct, IFormattable
SymbolDisplay\FormattedSymbol.cs (1)
53string IFormattable.ToString(string format, IFormatProvider formatProvider)
SymbolDisplay\FormattedSymbolList.cs (1)
52string IFormattable.ToString(string format, IFormatProvider formatProvider)
Microsoft.CodeAnalysis.Analyzers (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (1)
127=> compilation.GetTypeByMetadataName(typeof(IFormattable).FullName!);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
246return symbol?.MetadataName is nameof(FormattableString) or nameof(IFormattable)
Microsoft.CodeAnalysis.AnalyzerUtilities (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (1)
127=> compilation.GetTypeByMetadataName(typeof(IFormattable).FullName!);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
246return symbol?.MetadataName is nameof(FormattableString) or nameof(IFormattable)
Microsoft.CodeAnalysis.CodeStyle (3)
src\roslyn\src\Analyzers\Core\Analyzers\SimplifyInterpolation\AbstractSimplifyInterpolationHelpers.cs (1)
144FindType<IFormattable>(expression.SemanticModel) is { } systemIFormattable &&
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (1)
127=> compilation.GetTypeByMetadataName(typeof(IFormattable).FullName!);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
246return symbol?.MetadataName is nameof(FormattableString) or nameof(IFormattable)
Microsoft.CodeAnalysis.CSharp (6)
Symbols\Symbol.cs (1)
1844string IFormattable.ToString(string format, IFormatProvider formatProvider)
Symbols\SymbolDistinguisher.cs (3)
42public IFormattable First 47public IFormattable Second 244string IFormattable.ToString(string? format, IFormatProvider? formatProvider)
Symbols\TypeWithAnnotations.cs (1)
333string IFormattable.ToString(string format, IFormatProvider formatProvider)
Syntax\CSharpSyntaxNode.cs (1)
534string IFormattable.ToString(string? format, IFormatProvider? formatProvider)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (2)
130var stringValue = ((IFormattable)value).ToString("R", CultureInfo.InvariantCulture); 276: ((IFormattable)nonNegativeValue).ToString(formatString, CultureInfo.InvariantCulture) + suffix;
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (2)
130var stringValue = ((IFormattable)value).ToString("R", CultureInfo.InvariantCulture); 276: ((IFormattable)nonNegativeValue).ToString(formatString, CultureInfo.InvariantCulture) + suffix;
Microsoft.CodeAnalysis.Extensions.Package (2)
Compilation\CompilationExtensions.cs (1)
127=> compilation.GetTypeByMetadataName(typeof(IFormattable).FullName!);
Symbols\ITypeSymbolExtensions.cs (1)
246return symbol?.MetadataName is nameof(FormattableString) or nameof(IFormattable)
Microsoft.CodeAnalysis.Features (3)
EmbeddedLanguages\EmbeddedLanguageDetector.cs (2)
177Name: nameof(IFormattable), 188.GetMembers(nameof(IFormattable.ToString))
src\roslyn\src\Analyzers\Core\Analyzers\SimplifyInterpolation\AbstractSimplifyInterpolationHelpers.cs (1)
144FindType<IFormattable>(expression.SemanticModel) is { } systemIFormattable &&
Microsoft.CodeAnalysis.Razor.Compiler (1)
Language\RazorDiagnostic.cs (1)
110string IFormattable.ToString(string? format, IFormatProvider? formatProvider)
Microsoft.CodeAnalysis.ResxSourceGenerator (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (1)
127=> compilation.GetTypeByMetadataName(typeof(IFormattable).FullName!);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
246return symbol?.MetadataName is nameof(FormattableString) or nameof(IFormattable)
Microsoft.CodeAnalysis.Workspaces (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (1)
127=> compilation.GetTypeByMetadataName(typeof(IFormattable).FullName!);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
246return symbol?.MetadataName is nameof(FormattableString) or nameof(IFormattable)
Microsoft.Extensions.Compliance.Abstractions (6)
Redaction\Redactor.cs (6)
138if (value is IFormattable) 140return Redact(((IFormattable)value).ToString(format, provider)); 189if (value is IFormattable) 191return Redact(((IFormattable)value).ToString(format, provider), destination); 249if (value is IFormattable) 252var str = ((IFormattable)value).ToString(fmt, provider);
Microsoft.Extensions.Logging.Abstractions (1)
LogValuesFormatter.cs (1)
274e is IFormattable f ? f.ToString(null, CultureInfo.InvariantCulture) :
Microsoft.Extensions.Telemetry (1)
Logging\JustInTimeRedactor.cs (1)
112if (value is IFormattable f)
Microsoft.Maui.Controls (1)
ToStringValueConverter.cs (1)
14 if (value is IFormattable formattable)
Microsoft.Private.Windows.Core (1)
src\winforms\src\Microsoft.Private.Windows.Polyfills\System\ISpanFormattable.cs (1)
17/// An implementation of this interface should produce the same string of characters as an implementation of <see cref="IFormattable.ToString(string?, IFormatProvider?)"/>
Microsoft.VisualBasic.Core (8)
Microsoft\VisualBasic\Strings.vb (8)
1240Dim iformat As IFormattable = Nothing 1271iformat = TryCast(Expression, IFormattable) 1346Dim ifmt As IFormattable 1372ifmt = CType(Expression, IFormattable) 1429Dim ifmt As IFormattable 1455ifmt = CType(Expression, IFormattable) 1791Dim ifmt As IFormattable 1811ifmt = CType(Expression, IFormattable)
mscorlib (1)
src\runtime\src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
297[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IFormattable))]
netstandard (1)
netstandard.cs (1)
872[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IFormattable))]
PresentationCore (41)
MS\Internal\FontFace\FontDifferentiator.cs (3)
47parsedWeightName = ((IFormattable)fontWeight).ToString(null, CultureInfo.InvariantCulture); 50parsedStretchName = ((IFormattable)fontStretch).ToString(null, CultureInfo.InvariantCulture); 53parsedStyleName = ((IFormattable)fontStyle).ToString(null, CultureInfo.InvariantCulture);
System\Windows\FontStretch.cs (1)
195string IFormattable.ToString(string format, IFormatProvider provider)
System\Windows\FontStretchConverter.cs (1)
100return ((IFormattable)c).ToString(null, culture);
System\Windows\FontStyle.cs (1)
105string IFormattable.ToString(string format, IFormatProvider provider)
System\Windows\FontStyleConverter.cs (1)
100return ((IFormattable)c).ToString(null, culture);
System\Windows\FontWeight.cs (1)
192string IFormattable.ToString(string format, IFormatProvider provider)
System\Windows\FontWeightConverter.cs (1)
100return ((IFormattable)c).ToString(null, culture);
System\Windows\Media\Animation\KeySpline.cs (1)
457string IFormattable.ToString(string format, IFormatProvider formatProvider)
System\Windows\Media\Animation\RepeatBehavior.cs (1)
260string IFormattable.ToString(string format, IFormatProvider formatProvider)
System\Windows\Media\Color.cs (1)
251string IFormattable.ToString(string format, IFormatProvider provider)
System\Windows\Media\Generated\Brush.cs (1)
357string IFormattable.ToString(string format, IFormatProvider provider)
System\Windows\Media\Generated\DoubleCollection.cs (1)
663string IFormattable.ToString(string format, IFormatProvider provider)
System\Windows\Media\Generated\GeneralTransform.cs (1)
152string IFormattable.ToString(string format, IFormatProvider provider)
System\Windows\Media\Generated\Geometry.cs (1)
274string IFormattable.ToString(string format, IFormatProvider provider)
System\Windows\Media\Generated\GradientStop.cs (1)
189string IFormattable.ToString(string format, IFormatProvider provider)
System\Windows\Media\Generated\GradientStopCollection.cs (1)
746string IFormattable.ToString(string format, IFormatProvider provider)
System\Windows\Media\Generated\ImageSource.cs (1)
209string IFormattable.ToString(string format, IFormatProvider provider)
System\Windows\Media\Generated\Int32Collection.cs (1)
663string IFormattable.ToString(string format, IFormatProvider provider)
System\Windows\Media\Generated\PathFigureCollection.cs (1)
747string IFormattable.ToString(string format, IFormatProvider provider)
System\Windows\Media\Generated\PointCollection.cs (1)
663string IFormattable.ToString(string format, IFormatProvider provider)
System\Windows\Media\Generated\VectorCollection.cs (1)
663string IFormattable.ToString(string format, IFormatProvider provider)
System\Windows\Media\LineSegment.cs (1)
86return "L" + ((IFormattable)Point).ToString(format, provider);
System\Windows\Media\MatrixTransform.cs (1)
100return ((IFormattable)Matrix).ToString(format, provider);
System\Windows\Media\PathFigure.cs (2)
176string IFormattable.ToString(string format, IFormatProvider provider) 207((IFormattable)StartPoint).ToString(format, provider) +
System\Windows\Media3D\Generated\Camera.cs (1)
267string IFormattable.ToString(string format, IFormatProvider provider)
System\Windows\Media3D\Generated\GeneralTransform3D.cs (1)
150string IFormattable.ToString(string format, IFormatProvider provider)
System\Windows\Media3D\Generated\Material.cs (1)
207string IFormattable.ToString(string format, IFormatProvider provider)
System\Windows\Media3D\Generated\Matrix3D.cs (1)
347string IFormattable.ToString(string format, IFormatProvider provider)
System\Windows\Media3D\Generated\Model3D.cs (1)
267string IFormattable.ToString(string format, IFormatProvider provider)
System\Windows\Media3D\Generated\Point3D.cs (1)
314string IFormattable.ToString(string format, IFormatProvider provider)
System\Windows\Media3D\Generated\Point3DCollection.cs (1)
661string IFormattable.ToString(string format, IFormatProvider provider)
System\Windows\Media3D\Generated\Point4D.cs (1)
335string IFormattable.ToString(string format, IFormatProvider provider)
System\Windows\Media3D\Generated\Quaternion.cs (1)
299string IFormattable.ToString(string format, IFormatProvider provider)
System\Windows\Media3D\Generated\Rect3D.cs (1)
300string IFormattable.ToString(string format, IFormatProvider provider)
System\Windows\Media3D\Generated\Rotation3D.cs (1)
207string IFormattable.ToString(string format, IFormatProvider provider)
System\Windows\Media3D\Generated\Size3D.cs (1)
288string IFormattable.ToString(string format, IFormatProvider provider)
System\Windows\Media3D\Generated\Vector3D.cs (1)
314string IFormattable.ToString(string format, IFormatProvider provider)
System\Windows\Media3D\Generated\Vector3DCollection.cs (1)
661string IFormattable.ToString(string format, IFormatProvider provider)
ReachFramework (2)
Serialization\ColorTypeConverter.cs (2)
168IFormattable formattableColor = (IFormattable)color;
Roslyn.Diagnostics.Analyzers (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (1)
127=> compilation.GetTypeByMetadataName(typeof(IFormattable).FullName!);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ITypeSymbolExtensions.cs (1)
246return symbol?.MetadataName is nameof(FormattableString) or nameof(IFormattable)
Roslyn.Diagnostics.CSharp.Analyzers (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (2)
130var stringValue = ((IFormattable)value).ToString("R", CultureInfo.InvariantCulture); 276: ((IFormattable)nonNegativeValue).ToString(formatString, CultureInfo.InvariantCulture) + suffix;
rzc (5)
Json\Assumed_StringHandlers.cs (5)
28where TValue : IFormattable 53where TValue : IFormattable 78where TValue : IFormattable 102where TValue : IFormattable 128where TValue : IFormattable
System.ComponentModel.TypeConverter (1)
System\ComponentModel\TypeConverter.cs (1)
126if (value is IFormattable formattable)
System.Data.Common (4)
System\Data\Common\SQLConvert.cs (4)
483IFormattable? iformattable = (value as IFormattable); 731IFormattable? iformattable = (value as IFormattable);
System.Net.Primitives (3)
System\Net\IPAddress.cs (1)
476string IFormattable.ToString(string? format, IFormatProvider? formatProvider) =>
System\Net\IPEndPoint.cs (1)
289string IFormattable.ToString(string? format, IFormatProvider? formatProvider) => ToString();
System\Net\IPNetwork.cs (1)
347string IFormattable.ToString(string? format, IFormatProvider? provider) => ToString();
System.Private.CoreLib (37)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Char.cs (1)
214string IFormattable.ToString(string? format, IFormatProvider? formatProvider) => ToString(m_value);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Convert.cs (1)
1878if (value is IFormattable formattable)
src\runtime\src\libraries\System.Private.CoreLib\src\System\FormattableString.cs (1)
43string IFormattable.ToString(string? ignored, IFormatProvider? formatProvider) =>
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\TextWriter.cs (2)
295if (value is IFormattable f) 534if (value is IFormattable f)
src\runtime\src\libraries\System.Private.CoreLib\src\System\ISpanFormattable.cs (1)
16/// An implementation of this interface should produce the same string of characters as an implementation of <see cref="IFormattable.ToString(string?, IFormatProvider?)"/>
src\runtime\src\libraries\System.Private.CoreLib\src\System\IUtf8SpanFormattable.cs (1)
16/// An implementation of this interface should produce the same string of characters as an implementation of <see cref="IFormattable.ToString"/> or <see cref="ISpanFormattable.TryFormat"/>
src\runtime\src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.cs (4)
6159if (value is IFormattable) 6185s = ((IFormattable)value).ToString(format: null, _provider); // constrained call avoiding boxing for value types 6220if (value is IFormattable) 6246s = ((IFormattable)value).ToString(format, _provider); // constrained call avoiding boxing for value types
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\Vector_1.cs (2)
760sb.Append(((IFormattable)this.GetElementUnsafe(0)).ToString(format, formatProvider)); 766sb.Append(((IFormattable)this.GetElementUnsafe(i)).ToString(format, formatProvider));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\DefaultInterpolatedStringHandler.cs (4)
263if (value is IFormattable) 291s = ((IFormattable)value).ToString(format: null, _provider); // constrained call avoiding boxing for value types 330if (value is IFormattable) 358s = ((IFormattable)value).ToString(format, _provider); // constrained call avoiding boxing for value types
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector128_1.cs (2)
454sb.Append(((IFormattable)this.GetElementUnsafe(0)).ToString(format, formatProvider)); 460sb.Append(((IFormattable)this.GetElementUnsafe(i)).ToString(format, formatProvider));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector256_1.cs (2)
443sb.Append(((IFormattable)this.GetElementUnsafe(0)).ToString(format, formatProvider)); 449sb.Append(((IFormattable)this.GetElementUnsafe(i)).ToString(format, formatProvider));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector512_1.cs (2)
443sb.Append(((IFormattable)this.GetElementUnsafe(0)).ToString(format, formatProvider)); 449sb.Append(((IFormattable)this.GetElementUnsafe(i)).ToString(format, formatProvider));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector64_1.cs (2)
511sb.Append(((IFormattable)this.GetElementUnsafe(0)).ToString(format, formatProvider)); 517sb.Append(((IFormattable)this.GetElementUnsafe(i)).ToString(format, formatProvider));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Rune.cs (1)
1049string IFormattable.ToString(string? format, IFormatProvider? formatProvider) => ToString();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\StringBuilder.cs (5)
1794if (arg is IFormattable formattableArg) 3012if (value is IFormattable) 3056_stringBuilder.Append(((IFormattable)value).ToString(format: null, _provider)); // constrained call avoiding boxing for value types 3083if (value is IFormattable) 3127_stringBuilder.Append(((IFormattable)value).ToString(format, _provider)); // constrained call avoiding boxing for value types
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf8.cs (4)
461if (value is IFormattable) 470s = ((IFormattable)value).ToString(null, _provider); 519if (value is IFormattable) 528s = ((IFormattable)value).ToString(format, _provider);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\ValueStringBuilder.AppendFormat.cs (1)
231if (arg is IFormattable formattableArg)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Version.cs (1)
180string IFormattable.ToString(string? format, IFormatProvider? formatProvider) =>
System.Private.Uri (1)
System\Uri.cs (1)
1656string IFormattable.ToString(string? format, IFormatProvider? formatProvider) =>
System.Private.Xml (6)
System\Xml\Schema\XmlSchemaDataType.cs (6)
184if (cur is IFormattable) 186bldr.Append(((IFormattable)cur).ToString("", CultureInfo.InvariantCulture)); 196if (cur is IFormattable) 198bldr.Append(((IFormattable)cur).ToString("", CultureInfo.InvariantCulture)); 209else if (value is IFormattable) 211stringValue = ((IFormattable)value).ToString("", CultureInfo.InvariantCulture);
System.Runtime (1)
src\runtime\artifacts\obj\System.Runtime\Release\net11.0\System.Runtime.Forwards.cs (1)
276[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IFormattable))]
System.Windows.Forms (1)
System\Windows\Forms\Internal\Formatter.cs (1)
130if (value is IFormattable valueAsFormattable && !string.IsNullOrEmpty(formatString))