13 overrides of GetElementType
System.Private.CoreLib (9)
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\SymbolType.cs (1)
528public override Type? GetElementType()
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeBuilderInstantiation.cs (1)
228public override Type GetElementType() { throw new NotSupportedException(); }
src\libraries\System.Private.CoreLib\src\System\Reflection\ModifiedType.cs (1)
192public override Type? GetElementType() => _unmodifiedType.GetElementType(); // Supported
src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureType.cs (1)
57public sealed override Type? GetElementType() => ElementType;
src\libraries\System.Private.CoreLib\src\System\Reflection\TypeDelegator.cs (1)
160public override Type? GetElementType() => typeImpl.GetElementType();
src\libraries\System.Private.CoreLib\src\System\RuntimeType.cs (1)
96public override Type? GetElementType() => RuntimeTypeHandle.GetElementType(this);
src\System\Reflection\Emit\RuntimeEnumBuilder.cs (1)
246public override Type? GetElementType()
src\System\Reflection\Emit\RuntimeGenericTypeParameterBuilder.cs (1)
172public override Type GetElementType() { throw new NotSupportedException(); }
src\System\Reflection\Emit\RuntimeTypeBuilder.cs (1)
920public override Type GetElementType()
System.Reflection.Context (1)
System\Reflection\Context\Delegation\DelegatingType.cs (1)
313public override Type? GetElementType()
System.Reflection.Emit (1)
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\SymbolType.cs (1)
528public override Type? GetElementType()
System.Reflection.MetadataLoadContext (1)
System\Reflection\TypeLoading\Types\RoType.cs (1)
83public sealed override Type? GetElementType() => GetRoElementType();
System.Windows.Forms.Tests (1)
System\Windows\Forms\ListBindingHelperTests.cs (1)
837public override Type GetElementType() => throw new NotImplementedException();
415 references to GetElementType
dotnet-svcutil-lib (29)
FrameworkFork\Microsoft.CodeDom\System\CodeTypeReference.cs (1)
65_arrayElementType = new CodeTypeReference(type.GetElementType());
FrameworkFork\Microsoft.Xml\Xml\schema\GenerateConverter.cs (1)
844return type.GetElementType().Name + "Array";
FrameworkFork\Microsoft.Xml\Xml\schema\XmlValueConverter.cs (1)
3504Type itemTypeDst = destinationType.GetElementType();
FrameworkFork\Microsoft.Xml\Xml\Serialization\CodeGenerator.cs (2)
683Type objType = GetVariableType(obj).GetElementType(); 705Type objType = arrayType.GetElementType();
FrameworkFork\Microsoft.Xml\Xml\Serialization\CodeIdentifier.cs (1)
214t = t.GetElementType();
FrameworkFork\Microsoft.Xml\Xml\Serialization\SourceInfo.cs (1)
76Type eType = varType.GetElementType();
FrameworkFork\Microsoft.Xml\Xml\Serialization\Types.cs (3)
848arrayElementType = type.GetElementType(); 1025return "ArrayOf" + TypeName(t.GetElementType()); 1060return type.GetElementType();
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlReflectionImporter.cs (2)
1425throw new InvalidOperationException(string.Format(ResXml.XmlChoiceIdentifierType, identifierName, memberName, type.GetElementType().FullName)); 1427type = type.GetElementType();
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriter.cs (1)
3730isTypeDynamic = IsTypeDynamic(type.GetElementType());
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriterILGen.cs (1)
422SourceInfo source = new SourceInfo("p[" + i.ToString() + "]", null, null, pLengthLoc.LocalType.GetElementType(), ilg);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CodeGenerator.cs (2)
646Type objType = GetVariableType(obj).GetElementType(); 667Type objType = arrayType.GetElementType();
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\CollectionDataContract.cs (2)
684Init(CollectionKind.Array, type.GetElementType(), null); 926itemType = type.GetElementType();
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContract.cs (3)
1318itemType = itemType.GetElementType(); 1517Type itemType = type.GetElementType(); 1629itemType = itemType.GetElementType();
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlObjectSerializerReadContextComplex.cs (1)
176memberType = memberType.GetElementType();
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlObjectSerializerWriteContextComplex.cs (1)
219memberType = memberType.GetElementType();
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ServiceReflector.cs (1)
74return "ArrayOf" + TypeName(t.GetElementType());
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\TypeLoader.cs (1)
1525return parameterType.GetElementType();
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\XmlSerializerOperationBehavior.cs (1)
831member.MemberType = member.MemberType.GetElementType();
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\PrimitiveOperationFormatter.cs (3)
236string name = GetArrayItemName(type.GetElementType()); 318if (type.IsArray && type.GetArrayRank() == 1 && IsArrayTypeSupported(type.GetElementType())) 641_typeCode = description.Type.GetElementType().GetTypeCode();
InMemory.FunctionalTests (2)
src\Shared\TypeNameHelper\TypeNameHelper.cs (2)
98innerType = innerType.GetElementType()!; 108type = type.GetElementType()!;
Microsoft.AspNetCore.Components (4)
BindConverter.cs (2)
1789var elementType = typeof(T).GetElementType()!; 1996var elementType = typeof(T).GetElementType()!;
NavigationManagerExtensions.cs (1)
227var elementType = valueType.GetElementType()!;
Routing\QueryParameterValueSupplier.cs (1)
33var elementType = isArray ? targetType.GetElementType()! : targetType;
Microsoft.AspNetCore.Components.Endpoints (1)
FormMapping\Factories\CollectionConverterFactory.cs (1)
42return enumerable != null ? enumerable.GetGenericArguments()[0] : type.GetElementType()!;
Microsoft.AspNetCore.Diagnostics (3)
src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (1)
133parameterType = parameterType.GetElementType();
src\Shared\TypeNameHelper\TypeNameHelper.cs (2)
98innerType = innerType.GetElementType()!; 108type = type.GetElementType()!;
Microsoft.AspNetCore.Hosting (3)
src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (1)
133parameterType = parameterType.GetElementType();
src\Shared\TypeNameHelper\TypeNameHelper.cs (2)
98innerType = innerType.GetElementType()!; 108type = type.GetElementType()!;
Microsoft.AspNetCore.Http.Extensions (7)
RequestDelegateFactory.cs (4)
790(parameter.ParameterType.IsArray && ParameterBindingMethodCache.Instance.HasTryParseMethod(parameter.ParameterType.GetElementType()!)); 901(parameter.ParameterType.IsArray && ParameterBindingMethodCache.Instance.HasTryParseMethod(parameter.ParameterType.GetElementType()!)))) 1676var targetParseType = parameter.ParameterType.IsArray ? parameter.ParameterType.GetElementType()! : parameter.ParameterType; 1807Expression.Assign(argument, Expression.NewArrayBounds(parameter.ParameterType.GetElementType()!, Expression.ArrayLength(stringArrayExpr!))),
src\Components\Endpoints\src\FormMapping\Factories\CollectionConverterFactory.cs (1)
42return enumerable != null ? enumerable.GetGenericArguments()[0] : type.GetElementType()!;
src\Shared\TypeNameHelper\TypeNameHelper.cs (2)
98innerType = innerType.GetElementType()!; 108type = type.GetElementType()!;
Microsoft.AspNetCore.Mvc.Abstractions (3)
ModelBinding\ModelMetadata.cs (1)
768ElementType = ModelType.GetElementType()!;
src\Shared\TypeNameHelper\TypeNameHelper.cs (2)
98innerType = innerType.GetElementType()!; 108type = type.GetElementType()!;
Microsoft.AspNetCore.Mvc.Core (1)
ModelBinding\ModelBindingHelper.cs (1)
636var destinationElementType = destinationType.GetElementType()!;
Microsoft.AspNetCore.Mvc.Core.Test (2)
ModelBinding\Binders\ArrayModelBinderProviderTest.cs (2)
40Assert.Equal(modelType.GetElementType(), m.ModelType); 48Assert.IsType(typeof(ArrayModelBinder<>).MakeGenericType(modelType.GetElementType()), result);
Microsoft.AspNetCore.Mvc.NewtonsoftJson (1)
BsonTempDataSerializer.cs (1)
175actualType = typeToSerialize.GetElementType();
Microsoft.AspNetCore.OpenApi (3)
Services\OpenApiGenerator.cs (1)
459(parameter.ParameterType.IsArray && ParameterBindingMethodCache.Instance.HasTryParseMethod(parameter.ParameterType.GetElementType()!))))
src\Shared\TypeNameHelper\TypeNameHelper.cs (2)
98innerType = innerType.GetElementType()!; 108type = type.GetElementType()!;
Microsoft.AspNetCore.Server.IIS (3)
src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (1)
133parameterType = parameterType.GetElementType();
src\Shared\TypeNameHelper\TypeNameHelper.cs (2)
98innerType = innerType.GetElementType()!; 108type = type.GetElementType()!;
Microsoft.AspNetCore.Shared.Tests (3)
src\Shared\StackTrace\StackFrame\StackTraceHelper.cs (1)
133parameterType = parameterType.GetElementType();
src\Shared\TypeNameHelper\TypeNameHelper.cs (2)
98innerType = innerType.GetElementType()!; 108type = type.GetElementType()!;
Microsoft.Build (7)
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (2)
749finalTaskInputs.Add(Convert.ChangeType(item.ItemSpec, parameterType.GetElementType(), CultureInfo.InvariantCulture)); 765return InternalSetTaskParameter(parameter, finalTaskInputs.ToArray(parameterType.GetElementType()));
LoadedType.cs (1)
98pt = pt.GetElementType();
TaskParameter.cs (2)
122TypeCode typeCode = Type.GetTypeCode(wrappedParameterType.GetElementType()); 145else if (wrappedParameterType.GetElementType().GetTypeInfo().IsValueType)
TaskParameterTypeVerifier.cs (2)
31bool result = (parameterType.IsArray && parameterType.GetElementType().GetTypeInfo().IsValueType) || 52bool result = (parameterType.IsArray && parameterType.GetElementType().GetTypeInfo().IsValueType) || /* array of value types, or */
Microsoft.Build.Framework (1)
TaskPropertyInfo.cs (1)
30Type elementType = typeOfParameter.IsArray ? typeOfParameter.GetElementType() : typeOfParameter;
Microsoft.CodeAnalysis.CSharp (2)
Symbols\AssemblySymbol.cs (2)
759TypeSymbol? symbol = GetTypeByReflectionType(typeInfo.GetElementType()!); 771TypeSymbol? symbol = GetTypeByReflectionType(typeInfo.GetElementType()!);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
Extensions.cs (1)
522if (!IsEqual(arySym.ElementType, expType.GetElementType()))
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
CodeGeneration\CodeGenerationTests.cs (1)
670=> !type.IsArray ? GetTypeSymbol(compilation, type.FullName) : GetTypeSymbol(compilation, type.GetElementType().FullName, type.GetArrayRank());
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (2)
Debugger\Engine\DkmClrValue.cs (1)
572var type = DkmClrType.Create(this.Type.AppDomain, (TypeImpl)((element == null) ? array.GetType().GetElementType() : element.GetType()));
Debugger\MemberInfo\TypeImpl.cs (1)
153return (TypeImpl)(Type.GetElementType());
Microsoft.CodeAnalysis.Scripting (4)
Hosting\ObjectFormatter\CommonObjectFormatter.cs (1)
146builder.Append(TypeNameFormatter.FormatTypeName(parameter.ParameterType.GetElementType(), options));
Hosting\ObjectFormatter\CommonTypeNameFormatter.cs (3)
142Type elementType = arrayType.GetElementType(); 145elementType = elementType.GetElementType(); 200type = type.GetElementType();
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
Remote\ServiceDescriptorTests.cs (1)
74type = type.GetElementType();
Microsoft.CSharp (10)
Microsoft\CSharp\RuntimeBinder\RuntimeBinder.cs (1)
394ctype = TypeManager.GetParameterModifier(SymbolTable.GetCTypeFromType(type.GetElementType()), true);
Microsoft\CSharp\RuntimeBinder\RuntimeBinderExtensions.cs (4)
209t1.GetElementType().IsGenericallyEquivalentTo(t2.GetElementType(), member1, member2); 215return t1.GetElementType().IsGenericallyEquivalentTo(t2.GetElementType(), member1, member2);
Microsoft\CSharp\RuntimeBinder\SymbolTable.cs (5)
702GetCTypeFromType(t.GetElementType()), 704t.GetElementType().MakeArrayType() == t 711return TypeManager.GetPointer(GetCTypeFromType(t.GetElementType())); 736callingType = callingType.GetElementType(); 833? TypeManager.GetParameterModifier(LoadSymbolsFromType(type.GetElementType()), false)
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (1)
HelperFactory.cs (1)
328var elementType = parameterType.GetElementType();
Microsoft.Extensions.AI.Abstractions (6)
src\Shared\JsonSchemaExporter\NullabilityInfoContext\NullabilityInfoContext.cs (6)
345underlyingType = underlyingType.GetElementType()!; 375elementState = GetNullabilityInfo(memberInfo, underlyingType.GetElementType()!, parser, ref index); 470CheckGenericParameters(elementNullability, metaMember, metaType.GetElementType()!, reflectedType); 477CheckGenericParameters(nullability, metaMember, metaType.GetElementType()!, reflectedType); 570return (underlyingType.IsArray ? 1 : 0) + CountNullabilityStates(underlyingType.GetElementType()!); 628type.IsValueType || ((type.IsByRef || type.IsPointer) && type.GetElementType()!.IsValueType);
Microsoft.Extensions.Configuration.Binder (1)
ConfigurationBinder.cs (1)
812elementType = type.GetElementType()!;
Microsoft.Extensions.DependencyInjection (2)
src\libraries\Common\src\Extensions\TypeNameHelper\TypeNameHelper.cs (2)
114innerType = innerType.GetElementType()!; 124type = type.GetElementType()!;
Microsoft.Extensions.Diagnostics.Abstractions (2)
src\libraries\Common\src\Extensions\TypeNameHelper\TypeNameHelper.cs (2)
114innerType = innerType.GetElementType()!; 124type = type.GetElementType()!;
Microsoft.Extensions.Http (2)
src\libraries\Common\src\Extensions\TypeNameHelper\TypeNameHelper.cs (2)
114innerType = innerType.GetElementType()!; 124type = type.GetElementType()!;
Microsoft.Extensions.Logging.Abstractions (2)
src\libraries\Common\src\Extensions\TypeNameHelper\TypeNameHelper.cs (2)
114innerType = innerType.GetElementType()!; 124type = type.GetElementType()!;
Microsoft.Maui.Controls (1)
BindingExpression.cs (1)
341 part.SetterType = sourceType.GetElementType();
Microsoft.ML.Core (1)
CommandLine\CmdParser.cs (1)
1448ItemType = field.FieldType.GetElementType();
Microsoft.ML.Data (30)
Data\SchemaDefinition.cs (1)
236internal Type ReturnType => Generator?.GetMethodInfo().GetParameters().LastOrDefault().ParameterType.GetElementType();
DataLoadSave\Database\DatabaseLoader.cs (2)
149if (!InternalDataKindExtensions.TryGetDataKind(field.FieldType.IsArray ? field.FieldType.GetElementType() : field.FieldType, out dk)) 155if (!InternalDataKindExtensions.TryGetDataKind(property.PropertyType.IsArray ? property.PropertyType.GetElementType() : property.PropertyType, out dk))
DataLoadSave\Text\TextLoader.cs (2)
1612if (!InternalDataKindExtensions.TryGetDataKind(field.FieldType.IsArray ? field.FieldType.GetElementType() : field.FieldType, out dk)) 1618if (!InternalDataKindExtensions.TryGetDataKind(property.PropertyType.IsArray ? property.PropertyType.GetElementType() : property.PropertyType, out dk))
DataView\ArrayDataViewBuilder.cs (1)
88values.GetType().GetElementType().TryGetDataKind(out InternalDataKind kind);
DataView\DataViewConstructionUtils.cs (7)
246if (outputType.GetElementType() == typeof(string)) 253if (outputType.GetElementType().IsGenericType && outputType.GetElementType().GetGenericTypeDefinition() == typeof(Nullable<>)) 254Host.Assert(Nullable.GetUnderlyingType(outputType.GetElementType()) == vectorType.ItemType.RawType); 256Host.Assert(outputType.GetElementType() == vectorType.ItemType.RawType); 258genericType = outputType.GetElementType(); 919var itemType = typeT.GetElementType();
DataView\InternalSchemaDefinition.cs (2)
31public Type ComputedReturnType { get { return ReturnParameterInfo.ParameterType.GetElementType(); } } 168itemType = rawType.GetElementType();
DataView\TypedCursor.cs (6)
366if (fieldType.GetElementType() == typeof(string)) 373if (fieldType.GetElementType().IsGenericType && fieldType.GetElementType().GetGenericTypeDefinition() == typeof(Nullable<>)) 374Ch.Assert(colType.GetItemType().RawType == Nullable.GetUnderlyingType(fieldType.GetElementType())); 376Ch.Assert(colType.GetItemType().RawType == fieldType.GetElementType()); 378genericType = fieldType.GetElementType();
EntryPoints\EntryPointNode.cs (4)
71return CheckType(type.GetElementType()); 200return IsValidType(variableType.GetElementType()); 652valueType = valueType.GetElementType(); 863var type = _inputBuilder.GetFieldTypeOrNull(firstBinding.ParameterName).GetElementType();
EntryPoints\InputBuilder.cs (2)
316var elementType = type.GetElementType(); 463return Utils.MarshalInvoke(makeArray, type.GetElementType(), ectx, ja, attributes, catalog);
Transforms\ValueMapping.cs (2)
197type = rawType.GetElementType(); 773type = rawType.GetElementType();
Utilities\ColumnCursor.cs (1)
75var elementType = typeof(T).GetElementType();
Microsoft.ML.EntryPoints (1)
JsonUtils\JsonManifestUtils.cs (1)
371jo[FieldNames.ItemType] = BuildTypeToken(ectx, fieldInfo, type.GetElementType(), catalog);
Microsoft.ML.FastTree (5)
Dataset\Dataset.cs (5)
409Type arrayDataType = Data.GetType().GetElementType(); 679Type arrayDataType = qddata.Data.GetType().GetElementType(); 841Type t = arrays.First(x => x != null).GetType().GetElementType(); 843if (arrays.Any(x => x != null && t != x.GetType().GetElementType())) 845IEnumerable<string> typeNameEnumerable = arrays.Select(x => x.GetType().GetElementType()).Distinct().Select(x => x.Name).OrderBy(n => n);
Microsoft.ML.IntegrationTests (2)
Common.cs (2)
39Type[] typeArgs = { property.PropertyType.GetElementType() }; 40Activator.CreateInstance(property.PropertyType.GetElementType());
Microsoft.ML.Tests (1)
CollectionsDataViewTest.cs (1)
101if (!CompareObjectValues(x.GetValue(i), y.GetValue(i), x.GetType().GetElementType()))
Microsoft.ML.Transforms (3)
Expression\CodeGen.cs (1)
1257type = type.GetElementType();
Expression\LambdaBinder.cs (2)
1182type = type.GetElementType(); 1446type = type.GetElementType();
Microsoft.VisualBasic.Core (36)
Microsoft\VisualBasic\CompilerServices\Conversions.vb (1)
2520If TargetType.IsByRef Then TargetType = TargetType.GetElementType
Microsoft\VisualBasic\CompilerServices\LateBinding.vb (1)
764elemType = objType.GetElementType()
Microsoft\VisualBasic\CompilerServices\ObjectType.vb (3)
345Return ToType.GetElementType().IsAssignableFrom(FromType.GetElementType()) 3532toType = toType.GetElementType()
Microsoft\VisualBasic\CompilerServices\OverloadResolution.vb (5)
70If type1.IsByRef Then type1 = type1.GetElementType 71If type2.IsByRef Then type2 = type2.GetElementType 1031GetType(System.Collections.Generic.IList(Of )).MakeGenericType(New Type() {argumentType.GetElementType}) 1352parameterType = parameterType.GetElementType 1756Dim paramArrayElementType As System.Type = paramArrayParameter.ParameterType.GetElementType
Microsoft\VisualBasic\CompilerServices\Symbols.vb (3)
579Return RefersToGenericParameter(referringType.GetElementType, method) 617Return RefersToGenericParameterCLRSemantics(referringType.GetElementType, typ) 1212Dim elementType As Type = _type.GetElementType
Microsoft\VisualBasic\CompilerServices\Utils.LateBinder.vb (2)
458typ = typ.GetElementType 511parameterType = parameterType.GetElementType
Microsoft\VisualBasic\CompilerServices\Utils.vb (4)
309t1.GetElementType().IsGenericallyEquivalentTo(t2.GetElementType(), member1, member2) 314Return t1.GetElementType().IsGenericallyEquivalentTo(t2.GetElementType(), member1, member2)
Microsoft\VisualBasic\CompilerServices\VBBinder.vb (17)
552ParamArrayElementType = Parameters(ParamArrayIndex).ParameterType.GetElementType() 587ParmType = Parameters(ParamArrayIndex).ParameterType.GetElementType() 592ParmType = ParmType.GetElementType() 795ParamArrayElementType = Parameters(LastParmIndexToCheck).ParameterType.GetElementType() 808ParmType = ParmType.GetElementType() 1187ParamArrayElementType = parms(LastParmIndexToCheck).ParameterType.GetElementType() 1290ParamArrayElementType0 = AmbigParams(ParamArrayIndex0).ParameterType.GetElementType() 1303ParamArrayElementType1 = Parameters(ParamArrayIndex1).ParameterType.GetElementType() 1338Type0 = Type0.GetElementType() 1378Type1 = Type1.GetElementType() 1493paramType0 = paramType0.GetElementType() 1498paramType1 = paramType1.GetElementType() 1502paramType1 = paramType1.GetElementType() 1534paramType1 = paramType1.GetElementType() 1538paramType2 = paramType2.GetElementType() 1759If (typ Is GetType(System.Object)) OrElse (typ.IsByRef AndAlso typ.GetElementType() Is GetType(System.Object)) Then 1818ParmType = ParmType.GetElementType()
MSBuild (5)
LoadedType.cs (1)
98pt = pt.GetElementType();
TaskParameter.cs (2)
122TypeCode typeCode = Type.GetTypeCode(wrappedParameterType.GetElementType()); 145else if (wrappedParameterType.GetElementType().GetTypeInfo().IsValueType)
TaskParameterTypeVerifier.cs (2)
31bool result = (parameterType.IsArray && parameterType.GetElementType().GetTypeInfo().IsValueType) || 52bool result = (parameterType.IsArray && parameterType.GetElementType().GetTypeInfo().IsValueType) || /* array of value types, or */
MSBuildTaskHost (4)
TaskParameter.cs (2)
122TypeCode typeCode = Type.GetTypeCode(wrappedParameterType.GetElementType()); 145else if (wrappedParameterType.GetElementType().GetTypeInfo().IsValueType)
TaskParameterTypeVerifier.cs (2)
31bool result = (parameterType.IsArray && parameterType.GetElementType().GetTypeInfo().IsValueType) || 52bool result = (parameterType.IsArray && parameterType.GetElementType().GetTypeInfo().IsValueType) || /* array of value types, or */
PresentationBuildTasks (2)
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlReaderHelper.cs (2)
4213CurrentContext.ContextData = propertyType.GetElementType(); 4305CurrentContext.ContextData = propertyType.GetElementType();
PresentationCore (8)
MS\Internal\Ink\ExtendedProperty.cs (3)
54Type elementType1 = type1.GetElementType(); 55Type elementType2 = type2.GetElementType(); 190Type elementType = type.GetElementType();
System\Windows\BinaryFormat\BinaryFormatWriter.cs (1)
398PrimitiveType primitiveType = TypeInfo.GetPrimitiveType(array.GetType().GetElementType()!);
System\Windows\Media\CharacterMetricsDictionary.cs (1)
200Type elementType = array.GetType().GetElementType();
System\Windows\Media\CultureSpecificStringDictionary.cs (1)
169Type elementType = array.GetType().GetElementType();
System\Windows\Media\FamilyMapCollection.cs (1)
94Type elementType = array.GetType().GetElementType();
System\Windows\Media\FamilyTypefaceCollection.cs (1)
372Type elementType = array.GetType().GetElementType();
PresentationFramework (4)
MS\Internal\Data\PropertyPathWorker.cs (1)
1200sourceType = newType.GetElementType();
MS\Internal\WindowsRuntime\Generated\WinRT\Projections.cs (1)
106typeToTest = typeToTest.GetElementType();
System\Windows\Documents\TextElementCollection.cs (1)
600Type elementType = array.GetType().GetElementType();
System\Windows\Markup\BamlRecordReader.cs (1)
3128Type = context.ExpectedType.GetElementType()
System.CodeDom (1)
src\libraries\Common\src\System\CodeDom\CodeTypeReference.cs (1)
57ArrayElementType = new CodeTypeReference(type.GetElementType()!);
System.ComponentModel.Composition (5)
System\ComponentModel\Composition\ContractNameServices.cs (4)
184while ((elementType = elementType.GetElementType()) != null && elementType.IsArray); 192WriteType(typeName, type.GetElementType()!, formatGenericName); 201WriteType(typeName, type.GetElementType()!, formatGenericName); 317while ((elementType = elementType.GetElementType()) != null && elementType.IsArray) { }
System\ComponentModel\Composition\Hosting\CompositionServices.cs (1)
649IsValidAttributeType(type.GetElementType()!, false))
System.ComponentModel.TypeConverter (1)
System\ComponentModel\ArrayConverter.cs (1)
48Type elementType = arrayType.GetElementType()!;
System.Composition.Hosting (1)
System\Composition\Hosting\Providers\ImportMany\ImportManyExportDescriptorProvider.cs (1)
29contract.ContractType.GetElementType() :
System.Data.Common (2)
System\Data\DataRowComparer.cs (1)
67switch (Type.GetTypeCode(a.GetType().GetElementType()))
System\Data\TypeLimiter.cs (1)
286type = type.GetElementType()!;
System.Formats.Nrbf (1)
System\Formats\Nrbf\SerializationRecord.cs (1)
119return Matches(type.GetElementType()!, typeName.GetElementType());
System.Linq.Expressions (29)
System\Dynamic\Utils\DelegateHelpers.cs (2)
279paramType = paramType.GetElementType()!; 319Type byrefToType = parameters[i].ParameterType.GetElementType()!;
System\Dynamic\Utils\ExpressionUtils.cs (1)
160pType = pType.GetElementType()!;
System\Dynamic\Utils\TypeUtils.cs (5)
414source = source.GetElementType()!; 415dest = dest.GetElementType()!; 459return StrictHasReferenceConversionTo(source.GetElementType()!, destParams[0], false); 486return StrictHasReferenceConversionTo(sourceParams[0], dest.GetElementType()!, false); 912public static Type GetNonRefType(this Type type) => type.IsByRef ? type.GetElementType()! : type;
System\Linq\Expressions\BinaryExpression.cs (2)
749pType = pType.GetElementType()!; 2861return new SimpleBinaryExpression(ExpressionType.ArrayIndex, array, index, arrayType.GetElementType()!);
System\Linq\Expressions\Compiler\DelegateHelpers.Generated.cs (1)
109if (!t.IsByRef || t.GetElementType() != typeof(object))
System\Linq\Expressions\Compiler\ILGen.cs (1)
957il.Emit(OpCodes.Newarr, arrayType.GetElementType()!);
System\Linq\Expressions\Compiler\LambdaCompiler.Address.cs (1)
100if (node.Type.IsByRef && node.Type.GetElementType() == type)
System\Linq\Expressions\Compiler\LambdaCompiler.Expressions.cs (5)
312_ilg.EmitLoadElement(arrayType.GetElementType()!); 340_ilg.EmitStoreElement(arrayType.GetElementType()!); 527type = type.GetElementType()!; 879type = type.GetElementType()!; 905Type elementType = node.Type.GetElementType()!;
System\Linq\Expressions\Compiler\LambdaCompiler.Unary.cs (1)
313paramType = paramType.GetElementType()!;
System\Linq\Expressions\DebugViewWriter.cs (1)
791Out(".NewArray " + node.Type.GetElementType()!.ToString());
System\Linq\Expressions\IndexExpression.cs (1)
57return Object!.Type.GetElementType()!;
System\Linq\Expressions\Interpreter\LightCompiler.cs (2)
1059parameterType = parameterType.GetElementType()!; 2525Type elementType = node.Type.GetElementType()!;
System\Linq\Expressions\LambdaExpression.cs (1)
958pType = pType.GetElementType()!;
System\Linq\Expressions\MethodCallExpression.cs (1)
1360pType = pType.GetElementType()!;
System\Linq\Expressions\NewArrayExpression.cs (2)
76? NewArrayInit(Type.GetElementType()!, expressions) 77: NewArrayBounds(Type.GetElementType()!, expressions);
System\Linq\Expressions\NewExpression.cs (1)
258pType = pType.GetElementType()!;
System\Linq\Expressions\ParameterExpression.cs (1)
182type = type.GetElementType()!;
System.Linq.Queryable (3)
System\Linq\EnumerableRewriter.cs (3)
107Type elementType = type.GetElementType()!; 344parameterType = parameterType.GetElementType()!; 366Type tmp = isArray ? type.GetElementType()! : type;
System.Net.Http (1)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (1)
137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]";
System.Net.HttpListener (1)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (1)
137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]";
System.Net.Mail (1)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (1)
137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]";
System.Net.NameResolution (1)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (1)
137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]";
System.Net.Primitives (1)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (1)
137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]";
System.Net.Quic (1)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (1)
137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]";
System.Net.Requests (1)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (1)
137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]";
System.Net.Security (1)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (1)
137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]";
System.Net.Sockets (1)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (1)
137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]";
System.Net.WebSockets (1)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (1)
137return $"{arr.GetType().GetElementType()}[{((Array)value).Length}]";
System.Numerics.Tensors (4)
System\Numerics\Tensors\netcore\ReadOnlyTensorSpan.cs (2)
179if (array.GetType().GetElementType() != typeof(T)) 227if (array.GetType().GetElementType() != typeof(T))
System\Numerics\Tensors\netcore\TensorSpan.cs (2)
181if (array.GetType().GetElementType() != typeof(T)) 231if (array.GetType().GetElementType() != typeof(T))
System.Private.CoreLib (43)
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\Collection.cs (1)
209Type targetType = array.GetType().GetElementType()!;
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\ReadOnlyCollection.cs (1)
140Type targetType = array.GetType().GetElementType()!;
src\libraries\System.Private.CoreLib\src\System\DefaultBinder.cs (7)
197pCls = pCls.GetElementType()!; 971c1 = c1.GetElementType()!; 972c2 = c2.GetElementType()!; 976if (c1.GetElementType() == c2) 979c1 = c1.GetElementType()!; 983if (c2.GetElementType() == c1) 986c2 = c2.GetElementType()!;
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipeMetadataGenerator.cs (2)
457if (!GetTypeInfoFromType(arrayTypeInfo.DataType.GetElementType(), out elementTypeInfo)) 724|| !GetTypeInfoFromType(arrayTypeInfo.DataType.GetElementType(), out elementTypeInfo))
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (2)
5544if ((type.IsArray || type.IsPointer) && type.GetElementType() == typeof(byte)) 6082else if ((type.IsArray || type.IsPointer) && type.GetElementType() == typeof(byte))
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\Statics.cs (1)
417Type elementType = dataType.GetElementType()!;
src\libraries\System.Private.CoreLib\src\System\Reflection\CustomAttributeTypedArgument.cs (1)
60Type elementType = ArgumentType.GetElementType()!;
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeNameBuilder.cs (2)
254AddElementType(type.GetElementType()!); 271rootType = rootType.GetElementType()!;
src\libraries\System.Private.CoreLib\src\System\Reflection\ModifiedHasElementType.cs (1)
28Interlocked.CompareExchange(ref _elementType, GetTypeParameter(UnmodifiedType.GetElementType()!, 0), null);
src\libraries\System.Private.CoreLib\src\System\Reflection\ModifiedType.cs (1)
192public override Type? GetElementType() => _unmodifiedType.GetElementType(); // Supported
src\libraries\System.Private.CoreLib\src\System\Reflection\NullabilityInfoContext.cs (6)
359underlyingType = underlyingType.GetElementType()!; 389elementState = GetNullabilityInfo(memberInfo, underlyingType.GetElementType()!, parser, ref index); 484CheckGenericParameters(elementNullability, metaMember, metaType.GetElementType()!, reflectedType); 490CheckGenericParameters(nullability, metaMember, metaType.GetElementType()!, reflectedType); 590return (underlyingType.IsArray ? 1 : 0) + CountNullabilityStates(underlyingType.GetElementType()!); 646type.IsValueType || ((type.IsByRef || type.IsPointer) && type.GetElementType()!.IsValueType);
src\libraries\System.Private.CoreLib\src\System\Reflection\RuntimeMethodInfo.cs (2)
55Type elementType = type.GetElementType()!; 85Type elementType = ReturnType.GetElementType()!;
src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureTypeExtensions.cs (4)
36return actual.IsSZArray && pattern.ElementType!.MatchesExactly(actual.GetElementType()!); 40return actual.IsVariableBoundArray && pattern.GetArrayRank() == actual.GetArrayRank() && pattern.ElementType!.MatchesExactly(actual.GetElementType()!); 44return actual.IsByRef && pattern.ElementType!.MatchesExactly(actual.GetElementType()!); 48return actual.IsPointer && pattern.ElementType!.MatchesExactly(actual.GetElementType()!);
src\libraries\System.Private.CoreLib\src\System\Reflection\TypeDelegator.cs (1)
160public override Type? GetElementType() => typeImpl.GetElementType();
src\libraries\System.Private.CoreLib\src\System\Type.Helpers.cs (2)
71rootElementType = rootElementType.GetElementType()!; 89return GetElementType()!.IsVisible;
src\System\Reflection\Emit\CustomAttributeBuilder.cs (3)
262return t.GetArrayRank() == 1 && ValidateType(t.GetElementType()!); 342EmitType(writer, type.GetElementType()!); 431Type et = type.GetElementType()!;
src\System\Reflection\Emit\RuntimeTypeBuilder.cs (1)
192destType = destType.GetElementType()!;
src\System\Reflection\Emit\SignatureHelper.cs (4)
394clsArgument = clsArgument.GetElementType()!; 400AddOneArgTypeHelper(clsArgument.GetElementType()!); 408AddOneArgTypeHelper(clsArgument.GetElementType()!); 414AddOneArgTypeHelper(clsArgument.GetElementType()!);
src\System\StubHelpers.cs (1)
914Type elementType = pManagedHome.GetType().GetElementType()!;
System.Private.DataContractSerialization (13)
src\libraries\Common\src\System\CodeDom\CodeTypeReference.cs (1)
57ArrayElementType = new CodeTypeReference(type.GetElementType()!);
System\Runtime\Serialization\CodeGenerator.cs (2)
531Type objType = GetVariableType(obj).GetElementType()!; 552Type objType = arrayType.GetElementType()!;
System\Runtime\Serialization\CollectionDataContract.cs (4)
509Init(CollectionKind.Array, type.GetElementType(), null); 520Init(kind, type.GetElementType(), null); 535Init(CollectionKind.Array, type.GetElementType(), null); 959itemType = type.GetElementType()!;
System\Runtime\Serialization\DataContract.cs (4)
1128itemType = itemType.GetElementType()!; 1331Type itemType = type.GetElementType()!; 1418itemType = itemType.GetElementType()!; 2144return IsTypeVisible(t.GetElementType()!);
System\Runtime\Serialization\XmlObjectSerializerReadContextComplex.cs (1)
87memberType = memberType.GetElementType()!;
System\Runtime\Serialization\XmlObjectSerializerWriteContextComplex.cs (1)
185memberType = memberType.GetElementType()!;
System.Private.Windows.Core (7)
System\Private\Windows\BinaryFormat\BinaryFormatWriter.cs (1)
506PrimitiveType primitiveType = TypeInfo.GetPrimitiveType(array.GetType().GetElementType()!);
System\Private\Windows\BinaryFormat\Deserializer\ArrayRecordDeserializer.cs (2)
38elementType = elementType.GetElementType()!; 127elementType = elementType.GetElementType()!;
System\Private\Windows\BinaryFormat\Deserializer\ClassRecordDeserializer.cs (1)
88type = type.GetElementType()!;
System\Private\Windows\BinaryFormat\Support\TypeInfo.cs (1)
80? GetPrimitiveType(type.GetElementType()!)
System\TypeExtensions.cs (2)
30attributedType = attributedType.GetElementType()!; 98return MatchLessAssemblyVersion(type.GetElementType()!, typeName.GetElementType());
System.Private.Xml (19)
System\Xml\Schema\DataTypeImplementation.cs (1)
1128Debug.Assert(_itemType.ListValueType.GetElementType() == _itemType.ValueType);
System\Xml\Schema\XmlValueConverter.cs (1)
2972Type? itemTypeDst = destinationType.GetElementType();
System\Xml\Serialization\CodeGenerator.cs (2)
444Type objType = GetVariableType(obj).GetElementType()!; 466Type objType = arrayType.GetElementType()!;
System\Xml\Serialization\CodeIdentifier.cs (1)
223t = t.GetElementType()!;
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (2)
1936Array arrayValue = Array.CreateInstance(member.Mapping.TypeDesc!.Type!.GetElementType()!, vals.Length); 1991var newArray = Array.CreateInstance(memberType.GetElementType()!, length + 1);
System\Xml\Serialization\SourceInfo.cs (1)
80Type eType = varType.GetElementType()!;
System\Xml\Serialization\Types.cs (3)
809arrayElementType = type.GetElementType(); 976return $"ArrayOf{TypeName(t.GetElementType()!)}"; 1011return type.GetElementType();
System\Xml\Serialization\XmlReflectionImporter.cs (2)
1434throw new InvalidOperationException(SR.Format(SR.XmlChoiceIdentifierType, identifierName, memberName, type.GetElementType()!.FullName)); 1436type = type.GetElementType()!;
System\Xml\Serialization\XmlSerializationReaderILGen.cs (4)
623ilg.Stelem(arrayLoc.LocalType.GetElementType()!); 2717Type arrayElementType = localA.LocalType.GetElementType()!; 2802Type arrayElementType = CodeGenerator.GetVariableType(oVar).GetElementType()!; 2839Type varElementType = varType.GetElementType()!;
System\Xml\Serialization\XmlSerializationWriter.cs (1)
1504isTypeDynamic = IsTypeDynamic(type.GetElementType()!);
System\Xml\Serialization\XmlSerializationWriterILGen.cs (1)
411SourceInfo source = new SourceInfo($"p[{i}]", null, null, pLengthLoc.LocalType.GetElementType()!, ilg);
System.Reflection.Context (1)
System\Reflection\Context\Delegation\DelegatingType.cs (1)
315return _typeInfo.GetElementType();
System.Reflection.DispatchProxy (2)
System\Reflection\DispatchProxyGenerator.cs (2)
630Type argType = source.GetElementType()!; 723Type argType = _paramTypes[i].GetElementType()!;
System.Reflection.Emit (10)
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeNameBuilder.cs (2)
254AddElementType(type.GetElementType()!); 271rootType = rootType.GetElementType()!;
System\Reflection\Emit\ModuleBuilderImpl.cs (2)
1112Type elementType = type.GetElementType()!; 1188arrayMethod.DeclaringType!.GetElementType() is TypeBuilderImpl tb && Equals(tb.Module);
System\Reflection\Emit\SignatureHelper.cs (4)
21local.LocalType.IsByRef ? local.LocalType.GetElementType()! : local.LocalType, module); 172Type elementType = type.GetElementType()!; 187WriteSignatureForType(signature.Pointer(), type.GetElementType()!, module); 192WriteSignatureForType(signature, type.GetElementType()!, module);
System\Reflection\Emit\TypeBuilderImpl.cs (2)
744argType = argType.GetElementType(); 745paramType = paramType.GetElementType();
System.Reflection.MetadataLoadContext (27)
System\Reflection\DefaultBinder.cs (6)
460c1 = c1.GetElementType()!; 461c2 = c2.GetElementType()!; 465if (c1.GetElementType() == c2) 468c1 = c1.GetElementType()!; 472if (c2.GetElementType() == c1) 475c2 = c2.GetElementType()!;
System\Reflection\Runtime\BindingFlagSupport\MemberPolicies.cs (2)
149return GenericMethodAwareAreParameterTypesEqual(t1.GetElementType()!, t2.GetElementType()!);
System\Reflection\Runtime\SignatureTypeExtensions.cs (12)
39return actual.IsSZArray() && pattern.GetElementType()!.MatchesExactly(actual.GetElementType()!); 43return actual.IsVariableBoundArray() && pattern.GetArrayRank() == actual.GetArrayRank() && pattern.GetElementType()!.MatchesExactly(actual.GetElementType()!); 47return actual.IsByRef && pattern.GetElementType()!.MatchesExactly(actual.GetElementType()!); 51return actual.IsPointer && pattern.GetElementType()!.MatchesExactly(actual.GetElementType()!); 117return signatureType.GetElementType()!.TryResolve(genericMethodParameters)?.TryMakeArrayType(); 121return signatureType.GetElementType()!.TryResolve(genericMethodParameters)?.TryMakeArrayType(signatureType.GetArrayRank()); 125return signatureType.GetElementType()!.TryResolve(genericMethodParameters)?.TryMakeByRefType(); 129return signatureType.GetElementType()!.TryResolve(genericMethodParameters)?.TryMakePointerType();
System\Reflection\TypeLoading\General\Assignability.cs (7)
86Type toElementTypeInfo = toTypeInfo.GetElementType()!; 87Type fromElementTypeInfo = fromTypeInfo.GetElementType()!; 96Type toElementTypeInfo = toTypeInfo.GetElementType()!; 97Type fromElementTypeInfo = fromTypeInfo.GetElementType()!; 112Type toElementTypeInfo = toTypeInfo.GetElementType()!; 113Type fromElementTypeInfo = fromTypeInfo.GetElementType()!; 346Type? fromElementTypeInfo = fromTypeInfo.GetElementType();
System.Resources.Extensions (3)
System\Resources\Extensions\BinaryFormat\Deserializer\ArrayRecordDeserializer.cs (2)
41elementType = elementType.GetElementType()!; 136elementType = elementType.GetElementType()!;
System\Resources\Extensions\BinaryFormat\Deserializer\ClassRecordDeserializer.cs (1)
89type = type.GetElementType()!;
System.Runtime.Serialization.Formatters (2)
System\Runtime\Serialization\FormatterServices.cs (2)
321attributedType = attributedType.GetElementType()!; 345string typeName = GetClrTypeFullName(type.GetElementType()!);
System.Text.Json (1)
System\Text\Json\Serialization\Converters\Collection\IEnumerableConverterFactory.cs (1)
53elementType = typeToConvert.GetElementType();
System.Windows.Forms (5)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\ArrayElementGridEntry.cs (1)
23public override Type? PropertyType => ParentGridEntry?.PropertyType?.GetElementType();
System\Windows\Forms\DataBinding\Binding.BindToObject.cs (1)
154type = type.GetElementType();
System\Windows\Forms\DataBinding\ListBindingHelper.cs (3)
225return listType.GetElementType()!; 312Type? elementType = type.GetElementType(); 578pdc = TypeDescriptor.GetProperties(targetType.GetElementType()!, BrowsableAttributeList);
System.Windows.Forms.Design (6)
System\ComponentModel\Design\ArrayEditor.cs (1)
25=> CollectionType?.GetElementType();
System\ComponentModel\Design\InheritedPropertyDescriptor.cs (1)
55collectionType = parameter.ParameterType.GetElementType();
System\ComponentModel\Design\Serialization\CollectionCodeDomSerializer.cs (3)
250type = type.GetElementType()!; 357Type elementType = provider.GetRuntimeType(addRangeMethodToUse.GetParameters()[0].ParameterType.GetElementType()!); 397Type elementType = targetType.GetElementType()!;
System\Windows\Forms\Design\StringArrayEditor.cs (1)
16protected override Type CreateCollectionItemType() => CollectionType.GetElementType() ?? typeof(string[]);
System.Xaml (5)
System\Windows\Markup\ArrayExtension.cs (1)
47Type = elements.GetType().GetElementType();
System\Xaml\Runtime\DynamicMethodRuntime.cs (1)
379Type elementType = paramType.GetElementType();
System\Xaml\Schema\TypeReflector.cs (1)
152return IsVisibleTo(type.GetElementType(), accessingAssembly, schemaContext);
System\Xaml\XamlType.cs (2)
1016result = UnderlyingType.GetElementType(); 1600genericType = genericType.GetElementType();
xunit.assert (1)
Sdk\ArgumentFormatter.cs (1)
498 typeInfo = typeInfo.GetElementType()!.GetTypeInfo();