Share via


PropertyBaseExtensions.Format 方法

定义

创建给定属性的格式化字符串表示形式,例如 在引发有关键、索引等的异常时非常有用。使用 属性的 。

public static string Format (this System.Collections.Generic.IEnumerable<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyPropertyBase> properties, bool includeTypes = false);
static member Format : seq<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyPropertyBase> * bool -> string
<Extension()>
Public Function Format (properties As IEnumerable(Of IReadOnlyPropertyBase), Optional includeTypes As Boolean = false) As String

参数

properties
IEnumerable<IReadOnlyPropertyBase>

要设置格式的属性。

includeTypes
Boolean

如果为 true,则字符串中包含类型名称。 默认为 false

返回

字符串表示形式。

适用于