Expression.NewArrayBounds Yöntem
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Belirtilen dereceye NewArrayExpression sahip bir dizi oluşturmayı temsil eden bir oluşturur.
Aşırı Yüklemeler
| Name | Description |
|---|---|
| NewArrayBounds(Type, Expression[]) |
Belirtilen dereceye NewArrayExpression sahip bir dizi oluşturmayı temsil eden bir oluşturur. |
| NewArrayBounds(Type, IEnumerable<Expression>) |
Belirtilen dereceye NewArrayExpression sahip bir dizi oluşturmayı temsil eden bir oluşturur. |
NewArrayBounds(Type, Expression[])
- Kaynak:
- NewArrayExpression.cs
- Kaynak:
- NewArrayExpression.cs
- Kaynak:
- NewArrayExpression.cs
- Kaynak:
- NewArrayExpression.cs
- Kaynak:
- NewArrayExpression.cs
Belirtilen dereceye NewArrayExpression sahip bir dizi oluşturmayı temsil eden bir oluşturur.
public:
static System::Linq::Expressions::NewArrayExpression ^ NewArrayBounds(Type ^ type, ... cli::array <System::Linq::Expressions::Expression ^> ^ bounds);
public static System.Linq.Expressions.NewArrayExpression NewArrayBounds(Type type, params System.Linq.Expressions.Expression[] bounds);
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Creating arrays at runtime requires dynamic code generation.")]
public static System.Linq.Expressions.NewArrayExpression NewArrayBounds(Type type, params System.Linq.Expressions.Expression[] bounds);
static member NewArrayBounds : Type * System.Linq.Expressions.Expression[] -> System.Linq.Expressions.NewArrayExpression
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Creating arrays at runtime requires dynamic code generation.")>]
static member NewArrayBounds : Type * System.Linq.Expressions.Expression[] -> System.Linq.Expressions.NewArrayExpression
Public Shared Function NewArrayBounds (type As Type, ParamArray bounds As Expression()) As NewArrayExpression
Parametreler
- bounds
- Expression[]
Koleksiyonu doldurmak Expressions için kullanılacak bir nesne dizisiExpression.
Döndürülenler
NewArrayExpression özelliğine NodeType eşit NewArrayBounds ve Expressions özelliği belirtilen değere ayarlanmış bir.
- Öznitelikler
Özel durumlar
Type öğesinin bounds özelliği bir integral türünü temsil etmez.
Örnekler
Aşağıdaki örnek, 2 derecesine NewArrayBounds sahip bir dize dizisi oluşturmayı temsil eden bir ifade ağacı oluşturmak için yönteminin nasıl kullanılacağını gösterir.
// Create an expression tree that represents creating a
// two-dimensional array of type string with bounds [3,2].
System.Linq.Expressions.NewArrayExpression newArrayExpression =
System.Linq.Expressions.Expression.NewArrayBounds(
typeof(string),
System.Linq.Expressions.Expression.Constant(3),
System.Linq.Expressions.Expression.Constant(2));
// Output the string representation of the Expression.
Console.WriteLine(newArrayExpression.ToString());
// This code produces the following output:
//
// new System.String[,](3, 2)
' Create an expression tree that represents creating a string
' array with rank 2 and bounds (3,2).
Dim newArrayExpression As System.Linq.Expressions.NewArrayExpression = _
System.Linq.Expressions.Expression.NewArrayBounds( _
Type.GetType("System.String"), _
System.Linq.Expressions.Expression.Constant(3), _
System.Linq.Expressions.Expression.Constant(2))
' Output the string representation of the Expression.
Console.WriteLine(newArrayExpression.ToString())
' This code produces the following output:
'
' new System.String[,](3, 2)
Açıklamalar
Elde TypeNewArrayExpression edilen özelliğinin özelliği, derecesi uzunluğuna bounds eşit olan ve öğe türü olan bir dizi türünü typetemsil eder.
Type her öğesinin bounds özelliği bir integral türünü temsil etmelidir.
Şunlara uygulanır
NewArrayBounds(Type, IEnumerable<Expression>)
- Kaynak:
- NewArrayExpression.cs
- Kaynak:
- NewArrayExpression.cs
- Kaynak:
- NewArrayExpression.cs
- Kaynak:
- NewArrayExpression.cs
- Kaynak:
- NewArrayExpression.cs
Belirtilen dereceye NewArrayExpression sahip bir dizi oluşturmayı temsil eden bir oluşturur.
public:
static System::Linq::Expressions::NewArrayExpression ^ NewArrayBounds(Type ^ type, System::Collections::Generic::IEnumerable<System::Linq::Expressions::Expression ^> ^ bounds);
public static System.Linq.Expressions.NewArrayExpression NewArrayBounds(Type type, System.Collections.Generic.IEnumerable<System.Linq.Expressions.Expression> bounds);
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Creating arrays at runtime requires dynamic code generation.")]
public static System.Linq.Expressions.NewArrayExpression NewArrayBounds(Type type, System.Collections.Generic.IEnumerable<System.Linq.Expressions.Expression> bounds);
static member NewArrayBounds : Type * seq<System.Linq.Expressions.Expression> -> System.Linq.Expressions.NewArrayExpression
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Creating arrays at runtime requires dynamic code generation.")>]
static member NewArrayBounds : Type * seq<System.Linq.Expressions.Expression> -> System.Linq.Expressions.NewArrayExpression
Public Shared Function NewArrayBounds (type As Type, bounds As IEnumerable(Of Expression)) As NewArrayExpression
Parametreler
- bounds
- IEnumerable<Expression>
IEnumerable<T> Koleksiyonu doldurmak Expressions için kullanılacak nesneleri içerenExpression.
Döndürülenler
NewArrayExpression özelliğine NodeType eşit NewArrayBounds ve Expressions özelliği belirtilen değere ayarlanmış bir.
- Öznitelikler
Özel durumlar
Type öğesinin bounds özelliği bir integral türünü temsil etmez.
Örnekler
Aşağıdaki örnek, 2 derecesine NewArrayBounds sahip bir dize dizisi oluşturmayı temsil eden bir ifade ağacı oluşturmak için yönteminin nasıl kullanılacağını gösterir.
// Create an expression tree that represents creating a
// two-dimensional array of type string with bounds [3,2].
System.Linq.Expressions.NewArrayExpression newArrayExpression =
System.Linq.Expressions.Expression.NewArrayBounds(
typeof(string),
System.Linq.Expressions.Expression.Constant(3),
System.Linq.Expressions.Expression.Constant(2));
// Output the string representation of the Expression.
Console.WriteLine(newArrayExpression.ToString());
// This code produces the following output:
//
// new System.String[,](3, 2)
' Create an expression tree that represents creating a string
' array with rank 2 and bounds (3,2).
Dim newArrayExpression As System.Linq.Expressions.NewArrayExpression = _
System.Linq.Expressions.Expression.NewArrayBounds( _
Type.GetType("System.String"), _
System.Linq.Expressions.Expression.Constant(3), _
System.Linq.Expressions.Expression.Constant(2))
' Output the string representation of the Expression.
Console.WriteLine(newArrayExpression.ToString())
' This code produces the following output:
'
' new System.String[,](3, 2)
Açıklamalar
Elde TypeNewArrayExpression edilen özelliğinin özelliği, derecesi uzunluğuna bounds eşit olan ve öğe türü olan bir dizi türünü typetemsil eder.
Type her öğesinin bounds özelliği bir integral türünü temsil etmelidir.