From c437d1414b537694716a1f95c14ad8e822730d31 Mon Sep 17 00:00:00 2001
From: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
Date: Wed, 24 Jun 2026 15:04:54 -0700
Subject: [PATCH 1/2] Upgrade projects to target .NET 10
---
.../AssemblyBuilder/DefineDynamicModule/Project.csproj | 2 +-
.../AssemblyBuilder/Overview/AssemblyBuilderClass.csproj | 2 +-
.../ConstructorBuilder/AddDeclarativeSecurity/Project.csproj | 2 +-
.../ConstructorBuilder/Name/Project.csproj | 2 +-
.../ConstructorBuilder/Overview/Project.csproj | 2 +-
.../ConstructorBuilder/SetImplementationFlags/Project.csproj | 2 +-
.../CustomAttributeBuilder/Overview/Project.csproj | 2 +-
.../System.Reflection.Emit/DynamicMethod/.ctor/Project.csproj | 2 +-
.../DynamicMethod/Overview/Project.csproj | 2 +-
.../System.Reflection.Emit/EnumBuilder/Assembly/Project.csproj | 2 +-
.../System.Reflection.Emit/EnumBuilder/GUID/Project.csproj | 2 +-
.../EnumBuilder/GetCustomAttributes/Project.csproj | 2 +-
.../System.Reflection.Emit/EnumBuilder/Overview/Project.csproj | 2 +-
.../FieldBuilder/Attributes/Project.csproj | 2 +-
.../FieldBuilder/Overview/FieldBuilder.csproj | 2 +-
.../FieldBuilder/SetCustomAttribute/Project.csproj | 2 +-
.../GenericTypeParameterBuilder/MakeArrayType/Project.csproj | 2 +-
.../GenericTypeParameterBuilder/Overview/Project.csproj | 2 +-
.../ILGenerator/BeginCatchBlock/Project.csproj | 2 +-
.../ILGenerator/BeginFaultBlock/Project.csproj | 2 +-
.../ILGenerator/BeginFinallyBlock/Project.csproj | 2 +-
.../ILGenerator/BeginScope/Project.csproj | 2 +-
.../ILGenerator/DeclareLocal/Project.csproj | 2 +-
.../ILGenerator/DefineLabel/Project.csproj | 2 +-
.../System.Reflection.Emit/ILGenerator/Emit/Project.csproj | 2 +-
.../System.Reflection.Emit/ILGenerator/EmitCall/Project.csproj | 2 +-
.../System.Reflection.Emit/ILGenerator/EmitCalli/Project.csproj | 2 +-
.../ILGenerator/EmitWriteLine/Project.csproj | 2 +-
.../MethodBuilder/DeclaringType/Project.csproj | 2 +-
.../MethodBuilder/DefineGenericParameters/Project.csproj | 2 +-
.../MethodBuilder/GetILGenerator/Project.csproj | 2 +-
.../MethodBuilder/GetParameters/Project.csproj | 2 +-
.../MethodBuilder/MakeGenericMethod/Project.csproj | 2 +-
.../MethodBuilder/Overview/Project.csproj | 2 +-
.../MethodBuilder/SetImplementationFlags/Project.csproj | 2 +-
.../MethodBuilder/SetSignature/Project.csproj | 2 +-
.../ModuleBuilder/CreateGlobalFunctions/Project.csproj | 2 +-
.../ModuleBuilder/DefineInitializedData/Project.csproj | 2 +-
.../ModuleBuilder/DefinePInvokeMethod/Project.csproj | 2 +-
.../ModuleBuilder/DefineType/Project.csproj | 2 +-
.../ModuleBuilder/GetArrayMethod/Project.csproj | 2 +-
.../ModuleBuilder/Overview/Project.csproj | 2 +-
.../csharp/System.Reflection.Emit/OpCode/Value/Project.csproj | 2 +-
.../OpCodes/TakesSingleByteArgument/Project.csproj | 2 +-
.../ParameterBuilder/Overview/Project.csproj | 2 +-
.../PropertyBuilder/Overview/Project.csproj | 2 +-
.../PropertyBuilder/SetGetMethod/Project.csproj | 2 +-
.../TypeBuilder/AddInterfaceImplementation/Project.csproj | 2 +-
.../TypeBuilder/CreateType/Project.csproj | 2 +-
.../TypeBuilder/DefineMethod/Project.csproj | 2 +-
.../TypeBuilder/DefineMethodOverride/Project.csproj | 2 +-
.../TypeBuilder/DefinePInvokeMethod/Project.csproj | 2 +-
.../TypeBuilder/DefineTypeInitializer/Project.csproj | 2 +-
.../TypeBuilder/DefineUninitializedData/Project.csproj | 2 +-
.../TypeBuilder/MakeArrayType/Project.csproj | 2 +-
.../TypeBuilder/MakeGenericType/Project.csproj | 2 +-
.../BlobEncoder/MethodSignature/MethodSignatureSnippets.csproj | 2 +-
.../Overview/ControlFlowBuilderSnippets.csproj | 2 +-
.../Overview/InstructionEncoderSnippets.csproj | 2 +-
.../MetadataBuilder/MetadataBuilderSnippets.csproj | 2 +-
.../CustomAttribute/Overview/CustomAttributeSnippets.csproj | 2 +-
.../System.Reflection.Metadata/Document/DocumentSnippets.csproj | 2 +-
.../MetadataReader/MetadataReaderSnippets.csproj | 2 +-
.../MethodBodyBlock/MethodBodyBlockSnippets.csproj | 2 +-
.../SequencePoint/Overview/SequencePointSnippets.csproj | 2 +-
.../PEHeader/Overview/PEHeaderSnippets.csproj | 2 +-
.../System.Reflection/AmbiguousMatchException/Project.csproj | 2 +-
.../csharp/System.Reflection/Assembly/CodeBase/Project.csproj | 2 +-
.../csharp/System.Reflection/Assembly/FullName/Project.csproj | 2 +-
.../System.Reflection/Assembly/GetExportedTypes/Project.csproj | 2 +-
.../csharp/System.Reflection/Assembly/GetModules/Project.csproj | 2 +-
.../Assembly/GetReferencedAssemblies/Project.csproj | 2 +-
.../csharp/System.Reflection/Assembly/GetType/Project.csproj | 2 +-
.../AssemblyCompanyAttribute/Overview/Project.csproj | 2 +-
.../AssemblyDescriptionAttribute/Overview/Project.csproj | 2 +-
.../AssemblyFlagsAttribute/Overview/Project.csproj | 2 +-
.../csharp/System.Reflection/AssemblyName/.ctor/Project.csproj | 2 +-
.../System.Reflection/AssemblyName/CodeBase/Project.csproj | 2 +-
.../AssemblyName/GetAssemblyName/Project.csproj | 2 +-
.../System.Reflection/AssemblyName/SetPublicKey/Project.csproj | 2 +-
.../csharp/System.Reflection/Binder/Overview/Project.csproj | 2 +-
.../System.Reflection/BindingFlags/Overview/Project.csproj | 2 +-
.../System.Reflection/ConstructorInfo/MemberType/Project.csproj | 2 +-
.../System.Reflection/EventAttributes/Overview/Project.csproj | 2 +-
.../System.Reflection/EventInfo/AddEventHandler/cs.csproj | 2 +-
.../System.Reflection/EventInfo/EventHandlerType/Project.csproj | 2 +-
.../ExceptionHandlingClause/Overview/Project.csproj | 2 +-
.../System.Reflection/FieldAttributes/Overview/Project.csproj | 2 +-
.../System.Reflection/FieldInfo/FieldHandle/Project.csproj | 2 +-
.../csharp/System.Reflection/FieldInfo/FieldType/Project.csproj | 2 +-
.../FieldInfo/GetFieldFromHandle/Project.csproj | 2 +-
.../System.Reflection/FieldInfo/IsAssembly/Project.csproj | 2 +-
.../System.Reflection/FieldInfo/IsInitOnly/Project.csproj | 2 +-
.../System.Reflection/FieldInfo/IsPinvokeImpl/Project.csproj | 2 +-
.../csharp/System.Reflection/FieldInfo/IsPrivate/Project.csproj | 2 +-
.../csharp/System.Reflection/FieldInfo/IsPublic/Project.csproj | 2 +-
.../csharp/System.Reflection/FieldInfo/IsStatic/Project.csproj | 2 +-
.../System.Reflection/FieldInfo/MemberType/Project.csproj | 2 +-
.../csharp/System.Reflection/FieldInfo/Overview/Project.csproj | 2 +-
.../csharp/System.Reflection/FieldInfo/SetValue/Project.csproj | 2 +-
.../System.Reflection/IReflect/InvokeMember/Project.csproj | 2 +-
.../MemberInfo/GetCustomAttributes/Project.csproj | 2 +-
.../System.Reflection/MemberInfo/IsDefined/Project.csproj | 2 +-
.../csharp/System.Reflection/MemberInfo/Module/Project.csproj | 2 +-
.../csharp/System.Reflection/MemberInfo/Name/Project.csproj | 2 +-
.../System.Reflection/MemberInfo/ReflectedType/Project.csproj | 2 +-
.../System.Reflection/MemberTypes/Overview/Project.csproj | 2 +-
.../System.Reflection/MethodAttributes/Overview/Project.csproj | 2 +-
.../MethodBase/GetCurrentMethod/Project.csproj | 2 +-
.../MethodBase/GetMethodImplementationFlags/Project.csproj | 2 +-
.../csharp/System.Reflection/MethodBase/Invoke/Project.csproj | 2 +-
.../System.Reflection/MethodBase/IsAbstract/Project.csproj | 2 +-
.../System.Reflection/MethodBase/IsAssembly/Project.csproj | 2 +-
.../csharp/System.Reflection/MethodBase/IsFinal/Project.csproj | 2 +-
.../System.Reflection/MethodBase/IsHideBySig/Project.csproj | 2 +-
.../System.Reflection/MethodBase/IsSpecialName/Project.csproj | 2 +-
.../System.Reflection/MethodInfo/MemberType/Project.csproj | 2 +-
.../System.Reflection/MethodInfo/ReturnType/Project.csproj | 2 +-
.../csharp/System.Reflection/Missing/Overview/Project.csproj | 2 +-
.../csharp/System.Reflection/Module/Assembly/Project.csproj | 2 +-
.../System.Reflection/Module/FilterTypeName/Project.csproj | 2 +-
.../Module/FilterTypeNameIgnoreCase/Project.csproj | 2 +-
.../System.Reflection/Module/FullyQualifiedName/Project.csproj | 2 +-
.../csharp/System.Reflection/Module/IsDefined/Project.csproj | 2 +-
.../csharp/System.Reflection/Module/IsResource/Project.csproj | 2 +-
snippets/csharp/System.Reflection/Module/Name/Project.csproj | 2 +-
.../csharp/System.Reflection/Module/Overview/Project.csproj | 2 +-
.../System.Reflection/Module/ResolveMethod/Project.csproj | 2 +-
.../csharp/System.Reflection/Module/ScopeName/Project.csproj | 2 +-
.../csharp/System.Reflection/Module/ToString/Project.csproj | 2 +-
.../ModuleResolveEventHandler/Overview/Project.csproj | 2 +-
.../ObfuscateAssemblyAttribute/Overview/Project.csproj | 2 +-
.../ObfuscationAttribute/Overview/Project.csproj | 2 +-
.../ParameterAttributes/Overview/Project.csproj | 2 +-
.../System.Reflection/ParameterInfo/Attributes/Project.csproj | 2 +-
.../ParameterInfo/GetCustomAttributes/Project.csproj | 2 +-
.../System.Reflection/ParameterInfo/IsDefined/Project.csproj | 2 +-
.../csharp/System.Reflection/ParameterInfo/IsIn/Project.csproj | 2 +-
.../csharp/System.Reflection/ParameterInfo/IsOut/Project.csproj | 2 +-
.../csharp/System.Reflection/ParameterInfo/Name/Project.csproj | 2 +-
.../ParameterInfo/ParameterType/Project.csproj | 2 +-
.../System.Reflection/ParameterModifier/Overview/Project.csproj | 2 +-
.../PropertyAttributes/Overview/Project.csproj | 2 +-
.../System.Reflection/PropertyInfo/CanRead/Project.csproj | 2 +-
.../System.Reflection/PropertyInfo/CanWrite/Project.csproj | 2 +-
.../System.Reflection/PropertyInfo/GetGetMethod/Project.csproj | 2 +-
.../PropertyInfo/GetIndexParameters/Project.csproj | 2 +-
.../System.Reflection/PropertyInfo/GetSetMethod/Project.csproj | 2 +-
.../System.Reflection/PropertyInfo/MemberType/Project.csproj | 2 +-
.../System.Reflection/PropertyInfo/PropertyType/Project.csproj | 2 +-
.../System.Reflection/TypeInfo/Overview/reflection.csproj | 2 +-
151 files changed, 151 insertions(+), 151 deletions(-)
diff --git a/snippets/csharp/System.Reflection.Emit/AssemblyBuilder/DefineDynamicModule/Project.csproj b/snippets/csharp/System.Reflection.Emit/AssemblyBuilder/DefineDynamicModule/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection.Emit/AssemblyBuilder/DefineDynamicModule/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/AssemblyBuilder/DefineDynamicModule/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection.Emit/AssemblyBuilder/Overview/AssemblyBuilderClass.csproj b/snippets/csharp/System.Reflection.Emit/AssemblyBuilder/Overview/AssemblyBuilderClass.csproj
index 1d22a369970..f9929d13fb7 100644
--- a/snippets/csharp/System.Reflection.Emit/AssemblyBuilder/Overview/AssemblyBuilderClass.csproj
+++ b/snippets/csharp/System.Reflection.Emit/AssemblyBuilder/Overview/AssemblyBuilderClass.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net10.0
enable
diff --git a/snippets/csharp/System.Reflection.Emit/ConstructorBuilder/AddDeclarativeSecurity/Project.csproj b/snippets/csharp/System.Reflection.Emit/ConstructorBuilder/AddDeclarativeSecurity/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection.Emit/ConstructorBuilder/AddDeclarativeSecurity/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/ConstructorBuilder/AddDeclarativeSecurity/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection.Emit/ConstructorBuilder/Name/Project.csproj b/snippets/csharp/System.Reflection.Emit/ConstructorBuilder/Name/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection.Emit/ConstructorBuilder/Name/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/ConstructorBuilder/Name/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection.Emit/ConstructorBuilder/Overview/Project.csproj b/snippets/csharp/System.Reflection.Emit/ConstructorBuilder/Overview/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection.Emit/ConstructorBuilder/Overview/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/ConstructorBuilder/Overview/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection.Emit/ConstructorBuilder/SetImplementationFlags/Project.csproj b/snippets/csharp/System.Reflection.Emit/ConstructorBuilder/SetImplementationFlags/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection.Emit/ConstructorBuilder/SetImplementationFlags/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/ConstructorBuilder/SetImplementationFlags/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection.Emit/CustomAttributeBuilder/Overview/Project.csproj b/snippets/csharp/System.Reflection.Emit/CustomAttributeBuilder/Overview/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection.Emit/CustomAttributeBuilder/Overview/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/CustomAttributeBuilder/Overview/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection.Emit/DynamicMethod/.ctor/Project.csproj b/snippets/csharp/System.Reflection.Emit/DynamicMethod/.ctor/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection.Emit/DynamicMethod/.ctor/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/DynamicMethod/.ctor/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection.Emit/DynamicMethod/Overview/Project.csproj b/snippets/csharp/System.Reflection.Emit/DynamicMethod/Overview/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection.Emit/DynamicMethod/Overview/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/DynamicMethod/Overview/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection.Emit/EnumBuilder/Assembly/Project.csproj b/snippets/csharp/System.Reflection.Emit/EnumBuilder/Assembly/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection.Emit/EnumBuilder/Assembly/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/EnumBuilder/Assembly/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection.Emit/EnumBuilder/GUID/Project.csproj b/snippets/csharp/System.Reflection.Emit/EnumBuilder/GUID/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection.Emit/EnumBuilder/GUID/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/EnumBuilder/GUID/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection.Emit/EnumBuilder/GetCustomAttributes/Project.csproj b/snippets/csharp/System.Reflection.Emit/EnumBuilder/GetCustomAttributes/Project.csproj
index 048f23337c7..c8263ab3adb 100644
--- a/snippets/csharp/System.Reflection.Emit/EnumBuilder/GetCustomAttributes/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/EnumBuilder/GetCustomAttributes/Project.csproj
@@ -2,7 +2,7 @@
Library
- net481
+ net10.0
diff --git a/snippets/csharp/System.Reflection.Emit/EnumBuilder/Overview/Project.csproj b/snippets/csharp/System.Reflection.Emit/EnumBuilder/Overview/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection.Emit/EnumBuilder/Overview/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/EnumBuilder/Overview/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection.Emit/FieldBuilder/Attributes/Project.csproj b/snippets/csharp/System.Reflection.Emit/FieldBuilder/Attributes/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection.Emit/FieldBuilder/Attributes/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/FieldBuilder/Attributes/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection.Emit/FieldBuilder/Overview/FieldBuilder.csproj b/snippets/csharp/System.Reflection.Emit/FieldBuilder/Overview/FieldBuilder.csproj
index 1d22a369970..f9929d13fb7 100644
--- a/snippets/csharp/System.Reflection.Emit/FieldBuilder/Overview/FieldBuilder.csproj
+++ b/snippets/csharp/System.Reflection.Emit/FieldBuilder/Overview/FieldBuilder.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net10.0
enable
diff --git a/snippets/csharp/System.Reflection.Emit/FieldBuilder/SetCustomAttribute/Project.csproj b/snippets/csharp/System.Reflection.Emit/FieldBuilder/SetCustomAttribute/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection.Emit/FieldBuilder/SetCustomAttribute/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/FieldBuilder/SetCustomAttribute/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection.Emit/GenericTypeParameterBuilder/MakeArrayType/Project.csproj b/snippets/csharp/System.Reflection.Emit/GenericTypeParameterBuilder/MakeArrayType/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection.Emit/GenericTypeParameterBuilder/MakeArrayType/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/GenericTypeParameterBuilder/MakeArrayType/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection.Emit/GenericTypeParameterBuilder/Overview/Project.csproj b/snippets/csharp/System.Reflection.Emit/GenericTypeParameterBuilder/Overview/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection.Emit/GenericTypeParameterBuilder/Overview/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/GenericTypeParameterBuilder/Overview/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection.Emit/ILGenerator/BeginCatchBlock/Project.csproj b/snippets/csharp/System.Reflection.Emit/ILGenerator/BeginCatchBlock/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection.Emit/ILGenerator/BeginCatchBlock/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/ILGenerator/BeginCatchBlock/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection.Emit/ILGenerator/BeginFaultBlock/Project.csproj b/snippets/csharp/System.Reflection.Emit/ILGenerator/BeginFaultBlock/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection.Emit/ILGenerator/BeginFaultBlock/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/ILGenerator/BeginFaultBlock/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection.Emit/ILGenerator/BeginFinallyBlock/Project.csproj b/snippets/csharp/System.Reflection.Emit/ILGenerator/BeginFinallyBlock/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection.Emit/ILGenerator/BeginFinallyBlock/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/ILGenerator/BeginFinallyBlock/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection.Emit/ILGenerator/BeginScope/Project.csproj b/snippets/csharp/System.Reflection.Emit/ILGenerator/BeginScope/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection.Emit/ILGenerator/BeginScope/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/ILGenerator/BeginScope/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection.Emit/ILGenerator/DeclareLocal/Project.csproj b/snippets/csharp/System.Reflection.Emit/ILGenerator/DeclareLocal/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection.Emit/ILGenerator/DeclareLocal/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/ILGenerator/DeclareLocal/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection.Emit/ILGenerator/DefineLabel/Project.csproj b/snippets/csharp/System.Reflection.Emit/ILGenerator/DefineLabel/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection.Emit/ILGenerator/DefineLabel/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/ILGenerator/DefineLabel/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection.Emit/ILGenerator/Emit/Project.csproj b/snippets/csharp/System.Reflection.Emit/ILGenerator/Emit/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection.Emit/ILGenerator/Emit/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/ILGenerator/Emit/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection.Emit/ILGenerator/EmitCall/Project.csproj b/snippets/csharp/System.Reflection.Emit/ILGenerator/EmitCall/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection.Emit/ILGenerator/EmitCall/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/ILGenerator/EmitCall/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection.Emit/ILGenerator/EmitCalli/Project.csproj b/snippets/csharp/System.Reflection.Emit/ILGenerator/EmitCalli/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection.Emit/ILGenerator/EmitCalli/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/ILGenerator/EmitCalli/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection.Emit/ILGenerator/EmitWriteLine/Project.csproj b/snippets/csharp/System.Reflection.Emit/ILGenerator/EmitWriteLine/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection.Emit/ILGenerator/EmitWriteLine/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/ILGenerator/EmitWriteLine/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection.Emit/MethodBuilder/DeclaringType/Project.csproj b/snippets/csharp/System.Reflection.Emit/MethodBuilder/DeclaringType/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection.Emit/MethodBuilder/DeclaringType/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/MethodBuilder/DeclaringType/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection.Emit/MethodBuilder/DefineGenericParameters/Project.csproj b/snippets/csharp/System.Reflection.Emit/MethodBuilder/DefineGenericParameters/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection.Emit/MethodBuilder/DefineGenericParameters/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/MethodBuilder/DefineGenericParameters/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection.Emit/MethodBuilder/GetILGenerator/Project.csproj b/snippets/csharp/System.Reflection.Emit/MethodBuilder/GetILGenerator/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection.Emit/MethodBuilder/GetILGenerator/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/MethodBuilder/GetILGenerator/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection.Emit/MethodBuilder/GetParameters/Project.csproj b/snippets/csharp/System.Reflection.Emit/MethodBuilder/GetParameters/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection.Emit/MethodBuilder/GetParameters/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/MethodBuilder/GetParameters/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection.Emit/MethodBuilder/MakeGenericMethod/Project.csproj b/snippets/csharp/System.Reflection.Emit/MethodBuilder/MakeGenericMethod/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection.Emit/MethodBuilder/MakeGenericMethod/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/MethodBuilder/MakeGenericMethod/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection.Emit/MethodBuilder/Overview/Project.csproj b/snippets/csharp/System.Reflection.Emit/MethodBuilder/Overview/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection.Emit/MethodBuilder/Overview/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/MethodBuilder/Overview/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection.Emit/MethodBuilder/SetImplementationFlags/Project.csproj b/snippets/csharp/System.Reflection.Emit/MethodBuilder/SetImplementationFlags/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection.Emit/MethodBuilder/SetImplementationFlags/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/MethodBuilder/SetImplementationFlags/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection.Emit/MethodBuilder/SetSignature/Project.csproj b/snippets/csharp/System.Reflection.Emit/MethodBuilder/SetSignature/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection.Emit/MethodBuilder/SetSignature/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/MethodBuilder/SetSignature/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection.Emit/ModuleBuilder/CreateGlobalFunctions/Project.csproj b/snippets/csharp/System.Reflection.Emit/ModuleBuilder/CreateGlobalFunctions/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection.Emit/ModuleBuilder/CreateGlobalFunctions/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/ModuleBuilder/CreateGlobalFunctions/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection.Emit/ModuleBuilder/DefineInitializedData/Project.csproj b/snippets/csharp/System.Reflection.Emit/ModuleBuilder/DefineInitializedData/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection.Emit/ModuleBuilder/DefineInitializedData/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/ModuleBuilder/DefineInitializedData/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection.Emit/ModuleBuilder/DefinePInvokeMethod/Project.csproj b/snippets/csharp/System.Reflection.Emit/ModuleBuilder/DefinePInvokeMethod/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection.Emit/ModuleBuilder/DefinePInvokeMethod/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/ModuleBuilder/DefinePInvokeMethod/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection.Emit/ModuleBuilder/DefineType/Project.csproj b/snippets/csharp/System.Reflection.Emit/ModuleBuilder/DefineType/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection.Emit/ModuleBuilder/DefineType/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/ModuleBuilder/DefineType/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection.Emit/ModuleBuilder/GetArrayMethod/Project.csproj b/snippets/csharp/System.Reflection.Emit/ModuleBuilder/GetArrayMethod/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection.Emit/ModuleBuilder/GetArrayMethod/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/ModuleBuilder/GetArrayMethod/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection.Emit/ModuleBuilder/Overview/Project.csproj b/snippets/csharp/System.Reflection.Emit/ModuleBuilder/Overview/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection.Emit/ModuleBuilder/Overview/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/ModuleBuilder/Overview/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection.Emit/OpCode/Value/Project.csproj b/snippets/csharp/System.Reflection.Emit/OpCode/Value/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection.Emit/OpCode/Value/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/OpCode/Value/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection.Emit/OpCodes/TakesSingleByteArgument/Project.csproj b/snippets/csharp/System.Reflection.Emit/OpCodes/TakesSingleByteArgument/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection.Emit/OpCodes/TakesSingleByteArgument/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/OpCodes/TakesSingleByteArgument/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection.Emit/ParameterBuilder/Overview/Project.csproj b/snippets/csharp/System.Reflection.Emit/ParameterBuilder/Overview/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection.Emit/ParameterBuilder/Overview/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/ParameterBuilder/Overview/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection.Emit/PropertyBuilder/Overview/Project.csproj b/snippets/csharp/System.Reflection.Emit/PropertyBuilder/Overview/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection.Emit/PropertyBuilder/Overview/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/PropertyBuilder/Overview/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection.Emit/PropertyBuilder/SetGetMethod/Project.csproj b/snippets/csharp/System.Reflection.Emit/PropertyBuilder/SetGetMethod/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection.Emit/PropertyBuilder/SetGetMethod/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/PropertyBuilder/SetGetMethod/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection.Emit/TypeBuilder/AddInterfaceImplementation/Project.csproj b/snippets/csharp/System.Reflection.Emit/TypeBuilder/AddInterfaceImplementation/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection.Emit/TypeBuilder/AddInterfaceImplementation/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/TypeBuilder/AddInterfaceImplementation/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection.Emit/TypeBuilder/CreateType/Project.csproj b/snippets/csharp/System.Reflection.Emit/TypeBuilder/CreateType/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection.Emit/TypeBuilder/CreateType/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/TypeBuilder/CreateType/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection.Emit/TypeBuilder/DefineMethod/Project.csproj b/snippets/csharp/System.Reflection.Emit/TypeBuilder/DefineMethod/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection.Emit/TypeBuilder/DefineMethod/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/TypeBuilder/DefineMethod/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection.Emit/TypeBuilder/DefineMethodOverride/Project.csproj b/snippets/csharp/System.Reflection.Emit/TypeBuilder/DefineMethodOverride/Project.csproj
index 92e46ddaccf..a15a29bf12c 100644
--- a/snippets/csharp/System.Reflection.Emit/TypeBuilder/DefineMethodOverride/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/TypeBuilder/DefineMethodOverride/Project.csproj
@@ -2,7 +2,7 @@
Exe
- net9.0
+ net10.0
diff --git a/snippets/csharp/System.Reflection.Emit/TypeBuilder/DefinePInvokeMethod/Project.csproj b/snippets/csharp/System.Reflection.Emit/TypeBuilder/DefinePInvokeMethod/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection.Emit/TypeBuilder/DefinePInvokeMethod/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/TypeBuilder/DefinePInvokeMethod/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection.Emit/TypeBuilder/DefineTypeInitializer/Project.csproj b/snippets/csharp/System.Reflection.Emit/TypeBuilder/DefineTypeInitializer/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection.Emit/TypeBuilder/DefineTypeInitializer/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/TypeBuilder/DefineTypeInitializer/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection.Emit/TypeBuilder/DefineUninitializedData/Project.csproj b/snippets/csharp/System.Reflection.Emit/TypeBuilder/DefineUninitializedData/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection.Emit/TypeBuilder/DefineUninitializedData/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/TypeBuilder/DefineUninitializedData/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection.Emit/TypeBuilder/MakeArrayType/Project.csproj b/snippets/csharp/System.Reflection.Emit/TypeBuilder/MakeArrayType/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection.Emit/TypeBuilder/MakeArrayType/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/TypeBuilder/MakeArrayType/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection.Emit/TypeBuilder/MakeGenericType/Project.csproj b/snippets/csharp/System.Reflection.Emit/TypeBuilder/MakeGenericType/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection.Emit/TypeBuilder/MakeGenericType/Project.csproj
+++ b/snippets/csharp/System.Reflection.Emit/TypeBuilder/MakeGenericType/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection.Metadata.Ecma335/BlobEncoder/MethodSignature/MethodSignatureSnippets.csproj b/snippets/csharp/System.Reflection.Metadata.Ecma335/BlobEncoder/MethodSignature/MethodSignatureSnippets.csproj
index 8abc7def008..1394a827e7d 100644
--- a/snippets/csharp/System.Reflection.Metadata.Ecma335/BlobEncoder/MethodSignature/MethodSignatureSnippets.csproj
+++ b/snippets/csharp/System.Reflection.Metadata.Ecma335/BlobEncoder/MethodSignature/MethodSignatureSnippets.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net10.0
enable
diff --git a/snippets/csharp/System.Reflection.Metadata.Ecma335/ControlFlowBuilder/Overview/ControlFlowBuilderSnippets.csproj b/snippets/csharp/System.Reflection.Metadata.Ecma335/ControlFlowBuilder/Overview/ControlFlowBuilderSnippets.csproj
index 8abc7def008..1394a827e7d 100644
--- a/snippets/csharp/System.Reflection.Metadata.Ecma335/ControlFlowBuilder/Overview/ControlFlowBuilderSnippets.csproj
+++ b/snippets/csharp/System.Reflection.Metadata.Ecma335/ControlFlowBuilder/Overview/ControlFlowBuilderSnippets.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net10.0
enable
diff --git a/snippets/csharp/System.Reflection.Metadata.Ecma335/InstructionEncoder/Overview/InstructionEncoderSnippets.csproj b/snippets/csharp/System.Reflection.Metadata.Ecma335/InstructionEncoder/Overview/InstructionEncoderSnippets.csproj
index 8abc7def008..1394a827e7d 100644
--- a/snippets/csharp/System.Reflection.Metadata.Ecma335/InstructionEncoder/Overview/InstructionEncoderSnippets.csproj
+++ b/snippets/csharp/System.Reflection.Metadata.Ecma335/InstructionEncoder/Overview/InstructionEncoderSnippets.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net10.0
enable
diff --git a/snippets/csharp/System.Reflection.Metadata.Ecma335/MetadataBuilder/MetadataBuilderSnippets.csproj b/snippets/csharp/System.Reflection.Metadata.Ecma335/MetadataBuilder/MetadataBuilderSnippets.csproj
index 1d22a369970..f9929d13fb7 100644
--- a/snippets/csharp/System.Reflection.Metadata.Ecma335/MetadataBuilder/MetadataBuilderSnippets.csproj
+++ b/snippets/csharp/System.Reflection.Metadata.Ecma335/MetadataBuilder/MetadataBuilderSnippets.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net10.0
enable
diff --git a/snippets/csharp/System.Reflection.Metadata/CustomAttribute/Overview/CustomAttributeSnippets.csproj b/snippets/csharp/System.Reflection.Metadata/CustomAttribute/Overview/CustomAttributeSnippets.csproj
index 8c8d40ddc3a..f9929d13fb7 100644
--- a/snippets/csharp/System.Reflection.Metadata/CustomAttribute/Overview/CustomAttributeSnippets.csproj
+++ b/snippets/csharp/System.Reflection.Metadata/CustomAttribute/Overview/CustomAttributeSnippets.csproj
@@ -2,7 +2,7 @@
Exe
- net7.0
+ net10.0
enable
diff --git a/snippets/csharp/System.Reflection.Metadata/Document/DocumentSnippets.csproj b/snippets/csharp/System.Reflection.Metadata/Document/DocumentSnippets.csproj
index 1d22a369970..f9929d13fb7 100644
--- a/snippets/csharp/System.Reflection.Metadata/Document/DocumentSnippets.csproj
+++ b/snippets/csharp/System.Reflection.Metadata/Document/DocumentSnippets.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net10.0
enable
diff --git a/snippets/csharp/System.Reflection.Metadata/MetadataReader/MetadataReaderSnippets.csproj b/snippets/csharp/System.Reflection.Metadata/MetadataReader/MetadataReaderSnippets.csproj
index 1d22a369970..f9929d13fb7 100644
--- a/snippets/csharp/System.Reflection.Metadata/MetadataReader/MetadataReaderSnippets.csproj
+++ b/snippets/csharp/System.Reflection.Metadata/MetadataReader/MetadataReaderSnippets.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net10.0
enable
diff --git a/snippets/csharp/System.Reflection.Metadata/MethodBodyBlock/MethodBodyBlockSnippets.csproj b/snippets/csharp/System.Reflection.Metadata/MethodBodyBlock/MethodBodyBlockSnippets.csproj
index 1d22a369970..f9929d13fb7 100644
--- a/snippets/csharp/System.Reflection.Metadata/MethodBodyBlock/MethodBodyBlockSnippets.csproj
+++ b/snippets/csharp/System.Reflection.Metadata/MethodBodyBlock/MethodBodyBlockSnippets.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net10.0
enable
diff --git a/snippets/csharp/System.Reflection.Metadata/SequencePoint/Overview/SequencePointSnippets.csproj b/snippets/csharp/System.Reflection.Metadata/SequencePoint/Overview/SequencePointSnippets.csproj
index 1d22a369970..f9929d13fb7 100644
--- a/snippets/csharp/System.Reflection.Metadata/SequencePoint/Overview/SequencePointSnippets.csproj
+++ b/snippets/csharp/System.Reflection.Metadata/SequencePoint/Overview/SequencePointSnippets.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net10.0
enable
diff --git a/snippets/csharp/System.Reflection.PortableExecutable/PEHeader/Overview/PEHeaderSnippets.csproj b/snippets/csharp/System.Reflection.PortableExecutable/PEHeader/Overview/PEHeaderSnippets.csproj
index 8c8d40ddc3a..f9929d13fb7 100644
--- a/snippets/csharp/System.Reflection.PortableExecutable/PEHeader/Overview/PEHeaderSnippets.csproj
+++ b/snippets/csharp/System.Reflection.PortableExecutable/PEHeader/Overview/PEHeaderSnippets.csproj
@@ -2,7 +2,7 @@
Exe
- net7.0
+ net10.0
enable
diff --git a/snippets/csharp/System.Reflection/AmbiguousMatchException/Project.csproj b/snippets/csharp/System.Reflection/AmbiguousMatchException/Project.csproj
index 41f1d5ad4b2..a15a29bf12c 100644
--- a/snippets/csharp/System.Reflection/AmbiguousMatchException/Project.csproj
+++ b/snippets/csharp/System.Reflection/AmbiguousMatchException/Project.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net10.0
diff --git a/snippets/csharp/System.Reflection/Assembly/CodeBase/Project.csproj b/snippets/csharp/System.Reflection/Assembly/CodeBase/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection/Assembly/CodeBase/Project.csproj
+++ b/snippets/csharp/System.Reflection/Assembly/CodeBase/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection/Assembly/FullName/Project.csproj b/snippets/csharp/System.Reflection/Assembly/FullName/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/Assembly/FullName/Project.csproj
+++ b/snippets/csharp/System.Reflection/Assembly/FullName/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/Assembly/GetExportedTypes/Project.csproj b/snippets/csharp/System.Reflection/Assembly/GetExportedTypes/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/Assembly/GetExportedTypes/Project.csproj
+++ b/snippets/csharp/System.Reflection/Assembly/GetExportedTypes/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/Assembly/GetModules/Project.csproj b/snippets/csharp/System.Reflection/Assembly/GetModules/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/Assembly/GetModules/Project.csproj
+++ b/snippets/csharp/System.Reflection/Assembly/GetModules/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/Assembly/GetReferencedAssemblies/Project.csproj b/snippets/csharp/System.Reflection/Assembly/GetReferencedAssemblies/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/Assembly/GetReferencedAssemblies/Project.csproj
+++ b/snippets/csharp/System.Reflection/Assembly/GetReferencedAssemblies/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/Assembly/GetType/Project.csproj b/snippets/csharp/System.Reflection/Assembly/GetType/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/Assembly/GetType/Project.csproj
+++ b/snippets/csharp/System.Reflection/Assembly/GetType/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/AssemblyCompanyAttribute/Overview/Project.csproj b/snippets/csharp/System.Reflection/AssemblyCompanyAttribute/Overview/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection/AssemblyCompanyAttribute/Overview/Project.csproj
+++ b/snippets/csharp/System.Reflection/AssemblyCompanyAttribute/Overview/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection/AssemblyDescriptionAttribute/Overview/Project.csproj b/snippets/csharp/System.Reflection/AssemblyDescriptionAttribute/Overview/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/AssemblyDescriptionAttribute/Overview/Project.csproj
+++ b/snippets/csharp/System.Reflection/AssemblyDescriptionAttribute/Overview/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/AssemblyFlagsAttribute/Overview/Project.csproj b/snippets/csharp/System.Reflection/AssemblyFlagsAttribute/Overview/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/AssemblyFlagsAttribute/Overview/Project.csproj
+++ b/snippets/csharp/System.Reflection/AssemblyFlagsAttribute/Overview/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/AssemblyName/.ctor/Project.csproj b/snippets/csharp/System.Reflection/AssemblyName/.ctor/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection/AssemblyName/.ctor/Project.csproj
+++ b/snippets/csharp/System.Reflection/AssemblyName/.ctor/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection/AssemblyName/CodeBase/Project.csproj b/snippets/csharp/System.Reflection/AssemblyName/CodeBase/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection/AssemblyName/CodeBase/Project.csproj
+++ b/snippets/csharp/System.Reflection/AssemblyName/CodeBase/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection/AssemblyName/GetAssemblyName/Project.csproj b/snippets/csharp/System.Reflection/AssemblyName/GetAssemblyName/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/AssemblyName/GetAssemblyName/Project.csproj
+++ b/snippets/csharp/System.Reflection/AssemblyName/GetAssemblyName/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/AssemblyName/SetPublicKey/Project.csproj b/snippets/csharp/System.Reflection/AssemblyName/SetPublicKey/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection/AssemblyName/SetPublicKey/Project.csproj
+++ b/snippets/csharp/System.Reflection/AssemblyName/SetPublicKey/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection/Binder/Overview/Project.csproj b/snippets/csharp/System.Reflection/Binder/Overview/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/Binder/Overview/Project.csproj
+++ b/snippets/csharp/System.Reflection/Binder/Overview/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/BindingFlags/Overview/Project.csproj b/snippets/csharp/System.Reflection/BindingFlags/Overview/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/BindingFlags/Overview/Project.csproj
+++ b/snippets/csharp/System.Reflection/BindingFlags/Overview/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/ConstructorInfo/MemberType/Project.csproj b/snippets/csharp/System.Reflection/ConstructorInfo/MemberType/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/ConstructorInfo/MemberType/Project.csproj
+++ b/snippets/csharp/System.Reflection/ConstructorInfo/MemberType/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/EventAttributes/Overview/Project.csproj b/snippets/csharp/System.Reflection/EventAttributes/Overview/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection/EventAttributes/Overview/Project.csproj
+++ b/snippets/csharp/System.Reflection/EventAttributes/Overview/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection/EventInfo/AddEventHandler/cs.csproj b/snippets/csharp/System.Reflection/EventInfo/AddEventHandler/cs.csproj
index 1d22a369970..f9929d13fb7 100644
--- a/snippets/csharp/System.Reflection/EventInfo/AddEventHandler/cs.csproj
+++ b/snippets/csharp/System.Reflection/EventInfo/AddEventHandler/cs.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net10.0
enable
diff --git a/snippets/csharp/System.Reflection/EventInfo/EventHandlerType/Project.csproj b/snippets/csharp/System.Reflection/EventInfo/EventHandlerType/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/EventInfo/EventHandlerType/Project.csproj
+++ b/snippets/csharp/System.Reflection/EventInfo/EventHandlerType/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/ExceptionHandlingClause/Overview/Project.csproj b/snippets/csharp/System.Reflection/ExceptionHandlingClause/Overview/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/ExceptionHandlingClause/Overview/Project.csproj
+++ b/snippets/csharp/System.Reflection/ExceptionHandlingClause/Overview/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/FieldAttributes/Overview/Project.csproj b/snippets/csharp/System.Reflection/FieldAttributes/Overview/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/FieldAttributes/Overview/Project.csproj
+++ b/snippets/csharp/System.Reflection/FieldAttributes/Overview/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/FieldInfo/FieldHandle/Project.csproj b/snippets/csharp/System.Reflection/FieldInfo/FieldHandle/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/FieldInfo/FieldHandle/Project.csproj
+++ b/snippets/csharp/System.Reflection/FieldInfo/FieldHandle/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/FieldInfo/FieldType/Project.csproj b/snippets/csharp/System.Reflection/FieldInfo/FieldType/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/FieldInfo/FieldType/Project.csproj
+++ b/snippets/csharp/System.Reflection/FieldInfo/FieldType/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/FieldInfo/GetFieldFromHandle/Project.csproj b/snippets/csharp/System.Reflection/FieldInfo/GetFieldFromHandle/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/FieldInfo/GetFieldFromHandle/Project.csproj
+++ b/snippets/csharp/System.Reflection/FieldInfo/GetFieldFromHandle/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/FieldInfo/IsAssembly/Project.csproj b/snippets/csharp/System.Reflection/FieldInfo/IsAssembly/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/FieldInfo/IsAssembly/Project.csproj
+++ b/snippets/csharp/System.Reflection/FieldInfo/IsAssembly/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/FieldInfo/IsInitOnly/Project.csproj b/snippets/csharp/System.Reflection/FieldInfo/IsInitOnly/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/FieldInfo/IsInitOnly/Project.csproj
+++ b/snippets/csharp/System.Reflection/FieldInfo/IsInitOnly/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/FieldInfo/IsPinvokeImpl/Project.csproj b/snippets/csharp/System.Reflection/FieldInfo/IsPinvokeImpl/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/FieldInfo/IsPinvokeImpl/Project.csproj
+++ b/snippets/csharp/System.Reflection/FieldInfo/IsPinvokeImpl/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/FieldInfo/IsPrivate/Project.csproj b/snippets/csharp/System.Reflection/FieldInfo/IsPrivate/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/FieldInfo/IsPrivate/Project.csproj
+++ b/snippets/csharp/System.Reflection/FieldInfo/IsPrivate/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/FieldInfo/IsPublic/Project.csproj b/snippets/csharp/System.Reflection/FieldInfo/IsPublic/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/FieldInfo/IsPublic/Project.csproj
+++ b/snippets/csharp/System.Reflection/FieldInfo/IsPublic/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/FieldInfo/IsStatic/Project.csproj b/snippets/csharp/System.Reflection/FieldInfo/IsStatic/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/FieldInfo/IsStatic/Project.csproj
+++ b/snippets/csharp/System.Reflection/FieldInfo/IsStatic/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/FieldInfo/MemberType/Project.csproj b/snippets/csharp/System.Reflection/FieldInfo/MemberType/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/FieldInfo/MemberType/Project.csproj
+++ b/snippets/csharp/System.Reflection/FieldInfo/MemberType/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/FieldInfo/Overview/Project.csproj b/snippets/csharp/System.Reflection/FieldInfo/Overview/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/FieldInfo/Overview/Project.csproj
+++ b/snippets/csharp/System.Reflection/FieldInfo/Overview/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/FieldInfo/SetValue/Project.csproj b/snippets/csharp/System.Reflection/FieldInfo/SetValue/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/FieldInfo/SetValue/Project.csproj
+++ b/snippets/csharp/System.Reflection/FieldInfo/SetValue/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/IReflect/InvokeMember/Project.csproj b/snippets/csharp/System.Reflection/IReflect/InvokeMember/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/IReflect/InvokeMember/Project.csproj
+++ b/snippets/csharp/System.Reflection/IReflect/InvokeMember/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/MemberInfo/GetCustomAttributes/Project.csproj b/snippets/csharp/System.Reflection/MemberInfo/GetCustomAttributes/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/MemberInfo/GetCustomAttributes/Project.csproj
+++ b/snippets/csharp/System.Reflection/MemberInfo/GetCustomAttributes/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/MemberInfo/IsDefined/Project.csproj b/snippets/csharp/System.Reflection/MemberInfo/IsDefined/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/MemberInfo/IsDefined/Project.csproj
+++ b/snippets/csharp/System.Reflection/MemberInfo/IsDefined/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/MemberInfo/Module/Project.csproj b/snippets/csharp/System.Reflection/MemberInfo/Module/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/MemberInfo/Module/Project.csproj
+++ b/snippets/csharp/System.Reflection/MemberInfo/Module/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/MemberInfo/Name/Project.csproj b/snippets/csharp/System.Reflection/MemberInfo/Name/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/MemberInfo/Name/Project.csproj
+++ b/snippets/csharp/System.Reflection/MemberInfo/Name/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/MemberInfo/ReflectedType/Project.csproj b/snippets/csharp/System.Reflection/MemberInfo/ReflectedType/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/MemberInfo/ReflectedType/Project.csproj
+++ b/snippets/csharp/System.Reflection/MemberInfo/ReflectedType/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/MemberTypes/Overview/Project.csproj b/snippets/csharp/System.Reflection/MemberTypes/Overview/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/MemberTypes/Overview/Project.csproj
+++ b/snippets/csharp/System.Reflection/MemberTypes/Overview/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/MethodAttributes/Overview/Project.csproj b/snippets/csharp/System.Reflection/MethodAttributes/Overview/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/MethodAttributes/Overview/Project.csproj
+++ b/snippets/csharp/System.Reflection/MethodAttributes/Overview/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/MethodBase/GetCurrentMethod/Project.csproj b/snippets/csharp/System.Reflection/MethodBase/GetCurrentMethod/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/MethodBase/GetCurrentMethod/Project.csproj
+++ b/snippets/csharp/System.Reflection/MethodBase/GetCurrentMethod/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/MethodBase/GetMethodImplementationFlags/Project.csproj b/snippets/csharp/System.Reflection/MethodBase/GetMethodImplementationFlags/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection/MethodBase/GetMethodImplementationFlags/Project.csproj
+++ b/snippets/csharp/System.Reflection/MethodBase/GetMethodImplementationFlags/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection/MethodBase/Invoke/Project.csproj b/snippets/csharp/System.Reflection/MethodBase/Invoke/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/MethodBase/Invoke/Project.csproj
+++ b/snippets/csharp/System.Reflection/MethodBase/Invoke/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/MethodBase/IsAbstract/Project.csproj b/snippets/csharp/System.Reflection/MethodBase/IsAbstract/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/MethodBase/IsAbstract/Project.csproj
+++ b/snippets/csharp/System.Reflection/MethodBase/IsAbstract/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/MethodBase/IsAssembly/Project.csproj b/snippets/csharp/System.Reflection/MethodBase/IsAssembly/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/MethodBase/IsAssembly/Project.csproj
+++ b/snippets/csharp/System.Reflection/MethodBase/IsAssembly/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/MethodBase/IsFinal/Project.csproj b/snippets/csharp/System.Reflection/MethodBase/IsFinal/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/MethodBase/IsFinal/Project.csproj
+++ b/snippets/csharp/System.Reflection/MethodBase/IsFinal/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/MethodBase/IsHideBySig/Project.csproj b/snippets/csharp/System.Reflection/MethodBase/IsHideBySig/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/MethodBase/IsHideBySig/Project.csproj
+++ b/snippets/csharp/System.Reflection/MethodBase/IsHideBySig/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/MethodBase/IsSpecialName/Project.csproj b/snippets/csharp/System.Reflection/MethodBase/IsSpecialName/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/MethodBase/IsSpecialName/Project.csproj
+++ b/snippets/csharp/System.Reflection/MethodBase/IsSpecialName/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/MethodInfo/MemberType/Project.csproj b/snippets/csharp/System.Reflection/MethodInfo/MemberType/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/MethodInfo/MemberType/Project.csproj
+++ b/snippets/csharp/System.Reflection/MethodInfo/MemberType/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/MethodInfo/ReturnType/Project.csproj b/snippets/csharp/System.Reflection/MethodInfo/ReturnType/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/MethodInfo/ReturnType/Project.csproj
+++ b/snippets/csharp/System.Reflection/MethodInfo/ReturnType/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/Missing/Overview/Project.csproj b/snippets/csharp/System.Reflection/Missing/Overview/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/Missing/Overview/Project.csproj
+++ b/snippets/csharp/System.Reflection/Missing/Overview/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/Module/Assembly/Project.csproj b/snippets/csharp/System.Reflection/Module/Assembly/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/Module/Assembly/Project.csproj
+++ b/snippets/csharp/System.Reflection/Module/Assembly/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/Module/FilterTypeName/Project.csproj b/snippets/csharp/System.Reflection/Module/FilterTypeName/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/Module/FilterTypeName/Project.csproj
+++ b/snippets/csharp/System.Reflection/Module/FilterTypeName/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/Module/FilterTypeNameIgnoreCase/Project.csproj b/snippets/csharp/System.Reflection/Module/FilterTypeNameIgnoreCase/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/Module/FilterTypeNameIgnoreCase/Project.csproj
+++ b/snippets/csharp/System.Reflection/Module/FilterTypeNameIgnoreCase/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/Module/FullyQualifiedName/Project.csproj b/snippets/csharp/System.Reflection/Module/FullyQualifiedName/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/Module/FullyQualifiedName/Project.csproj
+++ b/snippets/csharp/System.Reflection/Module/FullyQualifiedName/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/Module/IsDefined/Project.csproj b/snippets/csharp/System.Reflection/Module/IsDefined/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/Module/IsDefined/Project.csproj
+++ b/snippets/csharp/System.Reflection/Module/IsDefined/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/Module/IsResource/Project.csproj b/snippets/csharp/System.Reflection/Module/IsResource/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/Module/IsResource/Project.csproj
+++ b/snippets/csharp/System.Reflection/Module/IsResource/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/Module/Name/Project.csproj b/snippets/csharp/System.Reflection/Module/Name/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/Module/Name/Project.csproj
+++ b/snippets/csharp/System.Reflection/Module/Name/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/Module/Overview/Project.csproj b/snippets/csharp/System.Reflection/Module/Overview/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/Module/Overview/Project.csproj
+++ b/snippets/csharp/System.Reflection/Module/Overview/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/Module/ResolveMethod/Project.csproj b/snippets/csharp/System.Reflection/Module/ResolveMethod/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/Module/ResolveMethod/Project.csproj
+++ b/snippets/csharp/System.Reflection/Module/ResolveMethod/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/Module/ScopeName/Project.csproj b/snippets/csharp/System.Reflection/Module/ScopeName/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/Module/ScopeName/Project.csproj
+++ b/snippets/csharp/System.Reflection/Module/ScopeName/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/Module/ToString/Project.csproj b/snippets/csharp/System.Reflection/Module/ToString/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/Module/ToString/Project.csproj
+++ b/snippets/csharp/System.Reflection/Module/ToString/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/ModuleResolveEventHandler/Overview/Project.csproj b/snippets/csharp/System.Reflection/ModuleResolveEventHandler/Overview/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/ModuleResolveEventHandler/Overview/Project.csproj
+++ b/snippets/csharp/System.Reflection/ModuleResolveEventHandler/Overview/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/ObfuscateAssemblyAttribute/Overview/Project.csproj b/snippets/csharp/System.Reflection/ObfuscateAssemblyAttribute/Overview/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/ObfuscateAssemblyAttribute/Overview/Project.csproj
+++ b/snippets/csharp/System.Reflection/ObfuscateAssemblyAttribute/Overview/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/ObfuscationAttribute/Overview/Project.csproj b/snippets/csharp/System.Reflection/ObfuscationAttribute/Overview/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/ObfuscationAttribute/Overview/Project.csproj
+++ b/snippets/csharp/System.Reflection/ObfuscationAttribute/Overview/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/ParameterAttributes/Overview/Project.csproj b/snippets/csharp/System.Reflection/ParameterAttributes/Overview/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/ParameterAttributes/Overview/Project.csproj
+++ b/snippets/csharp/System.Reflection/ParameterAttributes/Overview/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/ParameterInfo/Attributes/Project.csproj b/snippets/csharp/System.Reflection/ParameterInfo/Attributes/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/ParameterInfo/Attributes/Project.csproj
+++ b/snippets/csharp/System.Reflection/ParameterInfo/Attributes/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/ParameterInfo/GetCustomAttributes/Project.csproj b/snippets/csharp/System.Reflection/ParameterInfo/GetCustomAttributes/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/ParameterInfo/GetCustomAttributes/Project.csproj
+++ b/snippets/csharp/System.Reflection/ParameterInfo/GetCustomAttributes/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/ParameterInfo/IsDefined/Project.csproj b/snippets/csharp/System.Reflection/ParameterInfo/IsDefined/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/ParameterInfo/IsDefined/Project.csproj
+++ b/snippets/csharp/System.Reflection/ParameterInfo/IsDefined/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/ParameterInfo/IsIn/Project.csproj b/snippets/csharp/System.Reflection/ParameterInfo/IsIn/Project.csproj
index d6596077e1a..dfdef3fd2a7 100644
--- a/snippets/csharp/System.Reflection/ParameterInfo/IsIn/Project.csproj
+++ b/snippets/csharp/System.Reflection/ParameterInfo/IsIn/Project.csproj
@@ -2,7 +2,7 @@
Library
- net48
+ net10.0
diff --git a/snippets/csharp/System.Reflection/ParameterInfo/IsOut/Project.csproj b/snippets/csharp/System.Reflection/ParameterInfo/IsOut/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/ParameterInfo/IsOut/Project.csproj
+++ b/snippets/csharp/System.Reflection/ParameterInfo/IsOut/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/ParameterInfo/Name/Project.csproj b/snippets/csharp/System.Reflection/ParameterInfo/Name/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/ParameterInfo/Name/Project.csproj
+++ b/snippets/csharp/System.Reflection/ParameterInfo/Name/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/ParameterInfo/ParameterType/Project.csproj b/snippets/csharp/System.Reflection/ParameterInfo/ParameterType/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/ParameterInfo/ParameterType/Project.csproj
+++ b/snippets/csharp/System.Reflection/ParameterInfo/ParameterType/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/ParameterModifier/Overview/Project.csproj b/snippets/csharp/System.Reflection/ParameterModifier/Overview/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/ParameterModifier/Overview/Project.csproj
+++ b/snippets/csharp/System.Reflection/ParameterModifier/Overview/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/PropertyAttributes/Overview/Project.csproj b/snippets/csharp/System.Reflection/PropertyAttributes/Overview/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/PropertyAttributes/Overview/Project.csproj
+++ b/snippets/csharp/System.Reflection/PropertyAttributes/Overview/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/PropertyInfo/CanRead/Project.csproj b/snippets/csharp/System.Reflection/PropertyInfo/CanRead/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/PropertyInfo/CanRead/Project.csproj
+++ b/snippets/csharp/System.Reflection/PropertyInfo/CanRead/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/PropertyInfo/CanWrite/Project.csproj b/snippets/csharp/System.Reflection/PropertyInfo/CanWrite/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/PropertyInfo/CanWrite/Project.csproj
+++ b/snippets/csharp/System.Reflection/PropertyInfo/CanWrite/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/PropertyInfo/GetGetMethod/Project.csproj b/snippets/csharp/System.Reflection/PropertyInfo/GetGetMethod/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/PropertyInfo/GetGetMethod/Project.csproj
+++ b/snippets/csharp/System.Reflection/PropertyInfo/GetGetMethod/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/PropertyInfo/GetIndexParameters/Project.csproj b/snippets/csharp/System.Reflection/PropertyInfo/GetIndexParameters/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/PropertyInfo/GetIndexParameters/Project.csproj
+++ b/snippets/csharp/System.Reflection/PropertyInfo/GetIndexParameters/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/PropertyInfo/GetSetMethod/Project.csproj b/snippets/csharp/System.Reflection/PropertyInfo/GetSetMethod/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/PropertyInfo/GetSetMethod/Project.csproj
+++ b/snippets/csharp/System.Reflection/PropertyInfo/GetSetMethod/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/PropertyInfo/MemberType/Project.csproj b/snippets/csharp/System.Reflection/PropertyInfo/MemberType/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/PropertyInfo/MemberType/Project.csproj
+++ b/snippets/csharp/System.Reflection/PropertyInfo/MemberType/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/PropertyInfo/PropertyType/Project.csproj b/snippets/csharp/System.Reflection/PropertyInfo/PropertyType/Project.csproj
index c02dc5044e7..a369cfa8a80 100644
--- a/snippets/csharp/System.Reflection/PropertyInfo/PropertyType/Project.csproj
+++ b/snippets/csharp/System.Reflection/PropertyInfo/PropertyType/Project.csproj
@@ -2,7 +2,7 @@
Library
- net6.0
+ net10.0
\ No newline at end of file
diff --git a/snippets/csharp/System.Reflection/TypeInfo/Overview/reflection.csproj b/snippets/csharp/System.Reflection/TypeInfo/Overview/reflection.csproj
index 58fe5690a1b..b32a24c8329 100644
--- a/snippets/csharp/System.Reflection/TypeInfo/Overview/reflection.csproj
+++ b/snippets/csharp/System.Reflection/TypeInfo/Overview/reflection.csproj
@@ -2,7 +2,7 @@
Exe
- net6.0
+ net10.0
From 86596ff1f573d4841a7f2297f51628fc03686b02 Mon Sep 17 00:00:00 2001
From: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
Date: Wed, 24 Jun 2026 18:44:02 -0700
Subject: [PATCH 2/2] fix compile errors
---
.../DefineDynamicModule/source.cs | 18 +++++++-----------
.../constructorbuilder_attributes_4.cs | 10 ++--------
.../Name/constructorbuilder_name_5.cs | 4 +---
.../ConstructorBuilder/Overview/source.cs | 8 +++-----
...onstructorbuilder_setimplementationflags.cs | 4 ++--
.../CustomAttributeBuilder/Overview/source.cs | 2 +-
.../Assembly/enumbuilder_properties_5.cs | 12 +++++-------
.../GUID/enumbuilder_properties_4.cs | 14 +++++---------
.../enumbuilder_setcustomattribute1.cs | 2 +-
.../enumbuilder_setcustomattribute2.cs | 2 +-
.../Overview/modulebuilder_defineenum.cs | 7 +++----
.../Attributes/fieldbuilder_reflectedtype.cs | 2 +-
.../fieldbuilder_setcustomattributes.cs | 4 ++--
.../MakeArrayType/source.cs | 10 ++++------
.../Overview/source.cs | 10 ++++------
.../ILGenerator/BeginCatchBlock/source.cs | 7 +++----
.../ilgenerator_beginfaultblock.cs | 2 +-
.../ilgenerator_beginfinallyblock_2.cs | 2 +-
.../BeginScope/ilgenerator_begin_endscope.cs | 4 ++--
.../DeclareLocal/localbuilder_sample_4.cs | 12 +++++-------
.../ILGenerator/DefineLabel/source.cs | 2 +-
.../ILGenerator/Emit/source.cs | 2 +-
.../ILGenerator/EmitCall/source.cs | 2 +-
.../ILGenerator/EmitWriteLine/source.cs | 5 ++---
.../DeclaringType/methodbuilderclass.cs | 8 +++-----
.../DefineGenericParameters/source.cs | 10 +++-------
.../MethodBuilder/GetILGenerator/source.cs | 7 +++----
.../MethodBuilder/MakeGenericMethod/source.cs | 2 +-
.../MethodBuilder/Overview/source.cs | 8 +++-----
.../MethodBuilder/SetSignature/source.cs | 12 ++++--------
.../modulebuilder_createglobalfunctions.cs | 4 ++--
.../modulebuilder_defineinitializeddata.cs | 2 +-
.../modulebuilder_definepinvokemethod1.cs | 2 +-
.../ModuleBuilder/DefineType/source.cs | 8 +++-----
.../modulebuilder_getarraymethod.cs | 10 ++--------
.../ModuleBuilder/Overview/modulebuilder.cs | 7 +------
.../ParameterBuilder/Overview/source.cs | 2 +-
.../PropertyBuilder/Overview/source.cs | 9 ++++-----
.../propertybuilder_setgetmethod_4.cs | 7 +++----
.../typebuilder_sample_4.cs | 8 +++-----
.../TypeBuilder/CreateType/nestedenum.cs | 5 ++---
.../typebuilder_definenestedtype1.cs | 2 +-
.../DefinePInvokeMethod/100656_fix.cs | 9 ++++-----
.../typebuilder_defineuninitializeddata.cs | 2 +-
.../TypeBuilder/MakeArrayType/source.cs | 11 ++++-------
.../TypeBuilder/MakeGenericType/remarks.cs | 2 +-
...ssemblybuilder_defineversioninforesource.cs | 9 +++------
.../.ctor/assemblyname_constructor.cs | 6 ++----
.../CodeBase/assemblyname_codebase.cs | 8 +++-----
.../SetPublicKey/assemblyname_setpublickey.cs | 8 +++-----
.../Overview/typebuilder_getevents1.cs | 2 +-
.../constructorbuilder_getmodule_4.cs | 8 +-------
.../parameterinfo_isin_isout_isoptional.cs | 4 ++--
53 files changed, 125 insertions(+), 204 deletions(-)
diff --git a/snippets/csharp/System.Reflection.Emit/AssemblyBuilder/DefineDynamicModule/source.cs b/snippets/csharp/System.Reflection.Emit/AssemblyBuilder/DefineDynamicModule/source.cs
index a2a6bb6b77d..ed3df558153 100644
--- a/snippets/csharp/System.Reflection.Emit/AssemblyBuilder/DefineDynamicModule/source.cs
+++ b/snippets/csharp/System.Reflection.Emit/AssemblyBuilder/DefineDynamicModule/source.cs
@@ -12,7 +12,7 @@ public static void DefineDynamicModuleDemo1()
AppDomain myAppDomain = Thread.GetDomain();
AssemblyName myAsmName = new AssemblyName();
myAsmName.Name = "MyAssembly";
- AssemblyBuilder myAsmBuilder = myAppDomain.DefineDynamicAssembly(
+ AssemblyBuilder myAsmBuilder = AssemblyBuilder.DefineDynamicAssembly(
myAsmName,
AssemblyBuilderAccess.Run);
@@ -28,15 +28,14 @@ public static void DefineDynamicModuleDemo2()
AppDomain myAppDomain = Thread.GetDomain();
AssemblyName myAsmName = new AssemblyName();
myAsmName.Name = "MyAssembly";
- AssemblyBuilder myAsmBuilder = myAppDomain.DefineDynamicAssembly(
+ AssemblyBuilder myAsmBuilder = AssemblyBuilder.DefineDynamicAssembly(
myAsmName,
AssemblyBuilderAccess.Run);
// Create a transient dynamic module. Since no DLL name is specified with
// this constructor, it can not be saved. By specifying the second parameter
// of the constructor as false, we can suppress the emission of symbol info.
- ModuleBuilder myModuleBuilder = myAsmBuilder.DefineDynamicModule("MyModule2",
- false);
+ ModuleBuilder myModuleBuilder = myAsmBuilder.DefineDynamicModule("MyModule2");
//
}
public static void DefineDynamicModuleDemo3()
@@ -45,12 +44,11 @@ public static void DefineDynamicModuleDemo3()
AppDomain myAppDomain = Thread.GetDomain();
AssemblyName myAsmName = new AssemblyName();
myAsmName.Name = "MyAssembly";
- AssemblyBuilder myAsmBuilder = myAppDomain.DefineDynamicAssembly(
+ AssemblyBuilder myAsmBuilder = AssemblyBuilder.DefineDynamicAssembly(
myAsmName,
AssemblyBuilderAccess.Run);
// Create a dynamic module that can be saved as the specified DLL name.
- ModuleBuilder myModuleBuilder = myAsmBuilder.DefineDynamicModule("MyModule3",
- "MyModule3.dll");
+ ModuleBuilder myModuleBuilder = myAsmBuilder.DefineDynamicModule("MyModule3");
//
}
public static void DefineDynamicModuleDemo4()
@@ -59,14 +57,12 @@ public static void DefineDynamicModuleDemo4()
AppDomain myAppDomain = Thread.GetDomain();
AssemblyName myAsmName = new AssemblyName();
myAsmName.Name = "MyAssembly";
- AssemblyBuilder myAsmBuilder = myAppDomain.DefineDynamicAssembly(
+ AssemblyBuilder myAsmBuilder = AssemblyBuilder.DefineDynamicAssembly(
myAsmName,
AssemblyBuilderAccess.Run);
// Create a dynamic module that can be saved as the specified DLL name. By
// specifying the third parameter as true, we can allow the emission of symbol info.
- ModuleBuilder myModuleBuilder = myAsmBuilder.DefineDynamicModule("MyModule4",
- "MyModule4.dll",
- true);
+ ModuleBuilder myModuleBuilder = myAsmBuilder.DefineDynamicModule("MyModule4");
//
}
}
diff --git a/snippets/csharp/System.Reflection.Emit/ConstructorBuilder/AddDeclarativeSecurity/constructorbuilder_attributes_4.cs b/snippets/csharp/System.Reflection.Emit/ConstructorBuilder/AddDeclarativeSecurity/constructorbuilder_attributes_4.cs
index 235593640b4..9d2687a1773 100644
--- a/snippets/csharp/System.Reflection.Emit/ConstructorBuilder/AddDeclarativeSecurity/constructorbuilder_attributes_4.cs
+++ b/snippets/csharp/System.Reflection.Emit/ConstructorBuilder/AddDeclarativeSecurity/constructorbuilder_attributes_4.cs
@@ -36,8 +36,8 @@ internal MyConstructorBuilder()
AssemblyName myAssemblyName = new AssemblyName();
myAssemblyName.Name = "TempAssembly";
// Create a dynamic assembly
- myAssemblyBuilder = myCurrentDomain.DefineDynamicAssembly
- (myAssemblyName, AssemblyBuilderAccess.RunAndSave);
+ myAssemblyBuilder = AssemblyBuilder.DefineDynamicAssembly
+ (myAssemblyName, AssemblyBuilderAccess.Run);
// Create a dynamic module in the assembly.
myModuleBuilder = myAssemblyBuilder.DefineDynamicModule("TempModule");
FieldInfo myFieldInfo =
@@ -50,12 +50,6 @@ internal MyConstructorBuilder()
// Define a constructor of the dynamic class.
ConstructorBuilder myConstructor = myTypeBuilder.DefineConstructor(
MethodAttributes.Public, CallingConventions.Standard, myConstructorArgs);
- PermissionSet myPset = new PermissionSet(PermissionState.Unrestricted);
- // Add declarative security to the constructor.
- Console.WriteLine("Adding declarative security to the constructor.....");
- Console.WriteLine("The Security action to be taken is \"DENY\" and" +
- " Permission set is \"UNRESTRICTED\".");
- myConstructor.AddDeclarativeSecurity(SecurityAction.Deny,myPset);
//
MethodAttributes myMethodAttributes = myConstructor.Attributes;
Type myAttributeType = typeof(MethodAttributes);
diff --git a/snippets/csharp/System.Reflection.Emit/ConstructorBuilder/Name/constructorbuilder_name_5.cs b/snippets/csharp/System.Reflection.Emit/ConstructorBuilder/Name/constructorbuilder_name_5.cs
index 4b70df96189..bf818e6a2d7 100644
--- a/snippets/csharp/System.Reflection.Emit/ConstructorBuilder/Name/constructorbuilder_name_5.cs
+++ b/snippets/csharp/System.Reflection.Emit/ConstructorBuilder/Name/constructorbuilder_name_5.cs
@@ -33,7 +33,7 @@ public MyConstructorBuilder()
AssemblyName myAssemblyName = new AssemblyName();
myAssemblyName.Name = "TempAssembly";
// Create a dynamic assembly.
- myAssemblyBuilder = myCurrentDomain.DefineDynamicAssembly
+ myAssemblyBuilder = AssemblyBuilder.DefineDynamicAssembly
(myAssemblyName, AssemblyBuilderAccess.Run);
// Create a dynamic module in the assembly.
myModuleBuilder = myAssemblyBuilder.DefineDynamicModule("TempModule");
@@ -51,8 +51,6 @@ public MyConstructorBuilder()
Console.WriteLine("The constructor name is : "+ myConstructor.Name);
// Display the 'Type' object from which this object was obtained.
Console.WriteLine("The reflected type is : "+ myConstructor.ReflectedType);
- // Display the signature of the field.
- Console.WriteLine(myConstructor.Signature);
// Display the constructor builder instance as a string.
Console.WriteLine(myConstructor.ToString());
//
diff --git a/snippets/csharp/System.Reflection.Emit/ConstructorBuilder/Overview/source.cs b/snippets/csharp/System.Reflection.Emit/ConstructorBuilder/Overview/source.cs
index 1bd7c83ba4f..455c43f1668 100644
--- a/snippets/csharp/System.Reflection.Emit/ConstructorBuilder/Overview/source.cs
+++ b/snippets/csharp/System.Reflection.Emit/ConstructorBuilder/Overview/source.cs
@@ -18,12 +18,11 @@ public static Type DynamicPointTypeGen() {
AssemblyName myAsmName = new AssemblyName();
myAsmName.Name = "MyDynamicAssembly";
- AssemblyBuilder myAsmBuilder = myDomain.DefineDynamicAssembly(
+ AssemblyBuilder myAsmBuilder = AssemblyBuilder.DefineDynamicAssembly(
myAsmName,
- AssemblyBuilderAccess.RunAndSave);
+ AssemblyBuilderAccess.Run);
- ModuleBuilder pointModule = myAsmBuilder.DefineDynamicModule("PointModule",
- "Point.dll");
+ ModuleBuilder pointModule = myAsmBuilder.DefineDynamicModule("PointModule");
TypeBuilder pointTypeBld = pointModule.DefineType("Point",
TypeAttributes.Public);
@@ -109,7 +108,6 @@ public static Type DynamicPointTypeGen() {
// Let's save it, just for posterity.
- myAsmBuilder.Save("Point.dll");
return pointType;
}
diff --git a/snippets/csharp/System.Reflection.Emit/ConstructorBuilder/SetImplementationFlags/constructorbuilder_setimplementationflags.cs b/snippets/csharp/System.Reflection.Emit/ConstructorBuilder/SetImplementationFlags/constructorbuilder_setimplementationflags.cs
index 39651db3e8f..bab2815e9bb 100644
--- a/snippets/csharp/System.Reflection.Emit/ConstructorBuilder/SetImplementationFlags/constructorbuilder_setimplementationflags.cs
+++ b/snippets/csharp/System.Reflection.Emit/ConstructorBuilder/SetImplementationFlags/constructorbuilder_setimplementationflags.cs
@@ -30,10 +30,10 @@ internal MyConstructorBuilder()
AssemblyName myAssemblyName = new AssemblyName();
myAssemblyName.Name = "TempAssembly";
// Create a dynamic assembly.
- myAssemblyBuilder = myCurrentDomain.DefineDynamicAssembly
+ myAssemblyBuilder = AssemblyBuilder.DefineDynamicAssembly
(myAssemblyName, AssemblyBuilderAccess.Run);
// Create a dynamic module in the assembly.
- myModuleBuilder = myAssemblyBuilder.DefineDynamicModule("TempModule", true);
+ myModuleBuilder = myAssemblyBuilder.DefineDynamicModule("TempModule");
FieldInfo myFieldInfo2 =
myModuleBuilder.DefineUninitializedData("myField", 2, FieldAttributes.Public);
// Create a type in the module.
diff --git a/snippets/csharp/System.Reflection.Emit/CustomAttributeBuilder/Overview/source.cs b/snippets/csharp/System.Reflection.Emit/CustomAttributeBuilder/Overview/source.cs
index 9941828a4e1..74a49aa7604 100644
--- a/snippets/csharp/System.Reflection.Emit/CustomAttributeBuilder/Overview/source.cs
+++ b/snippets/csharp/System.Reflection.Emit/CustomAttributeBuilder/Overview/source.cs
@@ -55,7 +55,7 @@ public static Type BuildTypeWithCustomAttributesOnMethod()
AssemblyName myAsmName = new AssemblyName();
myAsmName.Name = "MyAssembly";
- AssemblyBuilder myAsmBuilder = currentDomain.DefineDynamicAssembly(
+ AssemblyBuilder myAsmBuilder = AssemblyBuilder.DefineDynamicAssembly(
myAsmName, AssemblyBuilderAccess.Run);
ModuleBuilder myModBuilder = myAsmBuilder.DefineDynamicModule("MyModule");
diff --git a/snippets/csharp/System.Reflection.Emit/EnumBuilder/Assembly/enumbuilder_properties_5.cs b/snippets/csharp/System.Reflection.Emit/EnumBuilder/Assembly/enumbuilder_properties_5.cs
index 5e28943508a..a838cae8fc3 100644
--- a/snippets/csharp/System.Reflection.Emit/EnumBuilder/Assembly/enumbuilder_properties_5.cs
+++ b/snippets/csharp/System.Reflection.Emit/EnumBuilder/Assembly/enumbuilder_properties_5.cs
@@ -33,7 +33,7 @@ public static void Main()
{
try
{
- CreateCallee(Thread.GetDomain(), AssemblyBuilderAccess.Save);
+ CreateCallee(Thread.GetDomain(), AssemblyBuilderAccess.Run);
Type[] myTypeArray = myModuleBuilder.GetTypes();
foreach(Type myType in myTypeArray)
{
@@ -48,7 +48,6 @@ public static void Main()
Console.WriteLine("Enum Module is :" + myEnumBuilder.Module.ToString());
Console.WriteLine("Enum Name is :" + myEnumBuilder.Name.ToString());
Console.WriteLine("Enum NameSpace is :" + myEnumBuilder.Namespace);
- myAssemblyBuilder.Save("EmittedAssembly.dll");
}
catch(NotSupportedException ex)
{
@@ -67,12 +66,11 @@ private static void CreateCallee(AppDomain myAppDomain, AssemblyBuilderAccess ac
myAssemblyName.Name = "EmittedAssembly";
// Create the dynamic assembly.
- myAssemblyBuilder = myAppDomain.DefineDynamicAssembly(myAssemblyName,
- AssemblyBuilderAccess.Save);
+ myAssemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(myAssemblyName,
+ AssemblyBuilderAccess.Run);
// Create a dynamic module.
- myModuleBuilder = myAssemblyBuilder.DefineDynamicModule("EmittedModule",
- "EmittedModule.mod");
+ myModuleBuilder = myAssemblyBuilder.DefineDynamicModule("EmittedModule");
// Create a dynamic Enum.
myEnumBuilder = myModuleBuilder.DefineEnum("MyNamespace.MyEnum",
@@ -88,4 +86,4 @@ private static void CreateCallee(AppDomain myAppDomain, AssemblyBuilderAccess ac
//
//
//
-//
\ No newline at end of file
+//
diff --git a/snippets/csharp/System.Reflection.Emit/EnumBuilder/GUID/enumbuilder_properties_4.cs b/snippets/csharp/System.Reflection.Emit/EnumBuilder/GUID/enumbuilder_properties_4.cs
index e08859998d7..67b86d2f390 100644
--- a/snippets/csharp/System.Reflection.Emit/EnumBuilder/GUID/enumbuilder_properties_4.cs
+++ b/snippets/csharp/System.Reflection.Emit/EnumBuilder/GUID/enumbuilder_properties_4.cs
@@ -32,7 +32,7 @@ public static void Main()
{
try
{
- CreateCallee(Thread.GetDomain(), AssemblyBuilderAccess.Save);
+ CreateCallee(Thread.GetDomain(), AssemblyBuilderAccess.Run);
Type[] myTypeArray = myModuleBuilder.GetTypes();
foreach(Type myType in myTypeArray)
{
@@ -40,14 +40,11 @@ public static void Main()
+ myType.Name);
}
- Console.WriteLine("Enum TypeToken is :" +
- myEnumBuilder.TypeToken.ToString());
Console.WriteLine("Enum UnderLyingField is :" +
myEnumBuilder.UnderlyingField.ToString());
Console.WriteLine("Enum UnderLyingSystemType is :" +
myEnumBuilder.UnderlyingSystemType.ToString());
Console.WriteLine("Enum GUID is :" + myEnumBuilder.GUID.ToString());
- myAssemblyBuilder.Save("EmittedAssembly.dll");
}
catch(NotSupportedException ex)
{
@@ -66,11 +63,10 @@ private static void CreateCallee(AppDomain myAppDomain, AssemblyBuilderAccess ac
myAssemblyName.Name = "EmittedAssembly";
// Create the dynamic assembly.
- myAssemblyBuilder = myAppDomain.DefineDynamicAssembly(myAssemblyName,
- AssemblyBuilderAccess.Save);
+ myAssemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(myAssemblyName,
+ AssemblyBuilderAccess.Run);
// Create a dynamic module.
- myModuleBuilder = myAssemblyBuilder.DefineDynamicModule("EmittedModule",
- "EmittedModule.mod");
+ myModuleBuilder = myAssemblyBuilder.DefineDynamicModule("EmittedModule");
// Create a dynamic Enum.
myEnumBuilder = myModuleBuilder.DefineEnum("MyNamespace.MyEnum",
TypeAttributes.Public, typeof(Int32));
@@ -84,4 +80,4 @@ private static void CreateCallee(AppDomain myAppDomain, AssemblyBuilderAccess ac
//
//
//
-//
\ No newline at end of file
+//
diff --git a/snippets/csharp/System.Reflection.Emit/EnumBuilder/GetCustomAttributes/enumbuilder_setcustomattribute1.cs b/snippets/csharp/System.Reflection.Emit/EnumBuilder/GetCustomAttributes/enumbuilder_setcustomattribute1.cs
index 884dc1d9e32..9c81586311f 100644
--- a/snippets/csharp/System.Reflection.Emit/EnumBuilder/GetCustomAttributes/enumbuilder_setcustomattribute1.cs
+++ b/snippets/csharp/System.Reflection.Emit/EnumBuilder/GetCustomAttributes/enumbuilder_setcustomattribute1.cs
@@ -75,7 +75,7 @@ private static void CreateCallee(AppDomain domain)
myAssemblyName.Name = "EmittedAssembly";
// Create the dynamic assembly.
- myAssemblyBuilder = domain.DefineDynamicAssembly(myAssemblyName, AssemblyBuilderAccess.Run);
+ myAssemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(myAssemblyName, AssemblyBuilderAccess.Run);
Type myType = typeof(MyAttribute);
ConstructorInfo myInfo = myType.GetConstructor(new Type[2]{typeof(String), typeof(int)});
diff --git a/snippets/csharp/System.Reflection.Emit/EnumBuilder/GetCustomAttributes/enumbuilder_setcustomattribute2.cs b/snippets/csharp/System.Reflection.Emit/EnumBuilder/GetCustomAttributes/enumbuilder_setcustomattribute2.cs
index d554243b842..0fecbee1264 100644
--- a/snippets/csharp/System.Reflection.Emit/EnumBuilder/GetCustomAttributes/enumbuilder_setcustomattribute2.cs
+++ b/snippets/csharp/System.Reflection.Emit/EnumBuilder/GetCustomAttributes/enumbuilder_setcustomattribute2.cs
@@ -65,7 +65,7 @@ private static void CreateCallee(AppDomain domain)
// Create the dynamic assembly.
AssemblyBuilder myAssemblyBuilder
- = domain.DefineDynamicAssembly(myAssemblyName, AssemblyBuilderAccess.Run);
+ = AssemblyBuilder.DefineDynamicAssembly(myAssemblyName, AssemblyBuilderAccess.Run);
Type myType = typeof(MyAttribute2);
ConstructorInfo myInfo = myType.GetConstructor(new Type[]{typeof(bool)});
diff --git a/snippets/csharp/System.Reflection.Emit/EnumBuilder/Overview/modulebuilder_defineenum.cs b/snippets/csharp/System.Reflection.Emit/EnumBuilder/Overview/modulebuilder_defineenum.cs
index ae573ef2a64..72c8b63f8e3 100644
--- a/snippets/csharp/System.Reflection.Emit/EnumBuilder/Overview/modulebuilder_defineenum.cs
+++ b/snippets/csharp/System.Reflection.Emit/EnumBuilder/Overview/modulebuilder_defineenum.cs
@@ -13,12 +13,12 @@ public static void Main()
// Create a dynamic assembly in the current application domain,
// and allow it to be executed and saved to disk.
AssemblyName aName = new AssemblyName("TempAssembly");
- AssemblyBuilder ab = currentDomain.DefineDynamicAssembly(
- aName, AssemblyBuilderAccess.RunAndSave);
+ AssemblyBuilder ab = AssemblyBuilder.DefineDynamicAssembly(
+ aName, AssemblyBuilderAccess.Run);
// Define a dynamic module in "TempAssembly" assembly. For a single-
// module assembly, the module has the same name as the assembly.
- ModuleBuilder mb = ab.DefineDynamicModule(aName.Name, aName.Name + ".dll");
+ ModuleBuilder mb = ab.DefineDynamicModule(aName.Name);
// Define a public enumeration with the name "Elevation" and an
// underlying type of Integer.
@@ -30,7 +30,6 @@ public static void Main()
// Create the type and save the assembly.
Type finished = eb.CreateType();
- ab.Save(aName.Name + ".dll");
foreach( object o in Enum.GetValues(finished) )
{
diff --git a/snippets/csharp/System.Reflection.Emit/FieldBuilder/Attributes/fieldbuilder_reflectedtype.cs b/snippets/csharp/System.Reflection.Emit/FieldBuilder/Attributes/fieldbuilder_reflectedtype.cs
index a917cab74f8..ad86a474556 100644
--- a/snippets/csharp/System.Reflection.Emit/FieldBuilder/Attributes/fieldbuilder_reflectedtype.cs
+++ b/snippets/csharp/System.Reflection.Emit/FieldBuilder/Attributes/fieldbuilder_reflectedtype.cs
@@ -24,7 +24,7 @@ private static Type CreateType(AppDomain currentDomain)
AssemblyName myAssemblyName = new AssemblyName();
myAssemblyName.Name = "DynamicAssembly";
AssemblyBuilder myAssembly =
- currentDomain.DefineDynamicAssembly(myAssemblyName,AssemblyBuilderAccess.Run);
+ AssemblyBuilder.DefineDynamicAssembly(myAssemblyName,AssemblyBuilderAccess.Run);
// Create a dynamic module in Dynamic Assembly.
ModuleBuilder myModuleBuilder=myAssembly.DefineDynamicModule("MyModule");
// Define a public class named "MyClass" in the assembly.
diff --git a/snippets/csharp/System.Reflection.Emit/FieldBuilder/SetCustomAttribute/fieldbuilder_setcustomattributes.cs b/snippets/csharp/System.Reflection.Emit/FieldBuilder/SetCustomAttribute/fieldbuilder_setcustomattributes.cs
index c85b2e1105d..1e8e2cca0af 100644
--- a/snippets/csharp/System.Reflection.Emit/FieldBuilder/SetCustomAttribute/fieldbuilder_setcustomattributes.cs
+++ b/snippets/csharp/System.Reflection.Emit/FieldBuilder/SetCustomAttribute/fieldbuilder_setcustomattributes.cs
@@ -49,9 +49,9 @@ private static Type CreateCallee(AppDomain currentDomain)
myAssemblyName.Name = "EmittedAssembly";
// Create the called dynamic assembly.
AssemblyBuilder myAssemblyBuilder =
- currentDomain.DefineDynamicAssembly(myAssemblyName, AssemblyBuilderAccess.RunAndSave);
+ AssemblyBuilder.DefineDynamicAssembly(myAssemblyName, AssemblyBuilderAccess.Run);
ModuleBuilder myModuleBuilder =
- myAssemblyBuilder.DefineDynamicModule("EmittedModule","EmittedModule.mod");
+ myAssemblyBuilder.DefineDynamicModule("EmittedModule");
// Define a public class named 'CustomClass' in the assembly.
TypeBuilder myTypeBuilder = myModuleBuilder.DefineType("CustomClass",
TypeAttributes.Public);
diff --git a/snippets/csharp/System.Reflection.Emit/GenericTypeParameterBuilder/MakeArrayType/source.cs b/snippets/csharp/System.Reflection.Emit/GenericTypeParameterBuilder/MakeArrayType/source.cs
index 178ad4aa1f3..a4240932bd4 100644
--- a/snippets/csharp/System.Reflection.Emit/GenericTypeParameterBuilder/MakeArrayType/source.cs
+++ b/snippets/csharp/System.Reflection.Emit/GenericTypeParameterBuilder/MakeArrayType/source.cs
@@ -10,20 +10,19 @@ public static void Main()
{
// Define a dynamic assembly to contain the sample type. The
// assembly will not be run, but only saved to disk, so
- // AssemblyBuilderAccess.Save is specified.
+ // AssemblyBuilderAccess.Run is specified.
//
AppDomain myDomain = AppDomain.CurrentDomain;
AssemblyName myAsmName = new
AssemblyName("MakeXxxGenericTypeParameterExample");
- AssemblyBuilder myAssembly = myDomain.DefineDynamicAssembly(
- myAsmName, AssemblyBuilderAccess.Save);
+ AssemblyBuilder myAssembly = AssemblyBuilder.DefineDynamicAssembly(
+ myAsmName, AssemblyBuilderAccess.Run);
// An assembly is made up of executable modules. For a single-
// module assembly, the module name and file name are the same
// as the assembly name.
//
- ModuleBuilder myModule = myAssembly.DefineDynamicModule(
- myAsmName.Name, myAsmName.Name + ".dll");
+ ModuleBuilder myModule = myAssembly.DefineDynamicModule(myAsmName.Name);
// Define the sample type.
TypeBuilder myType = myModule.DefineType("Sample",
@@ -72,7 +71,6 @@ public static void Main()
// information in.
//
myType.CreateType();
- myAssembly.Save(myAsmName.Name + ".dll");
}
}
//
diff --git a/snippets/csharp/System.Reflection.Emit/GenericTypeParameterBuilder/Overview/source.cs b/snippets/csharp/System.Reflection.Emit/GenericTypeParameterBuilder/Overview/source.cs
index db9ac678f93..af7746102a6 100644
--- a/snippets/csharp/System.Reflection.Emit/GenericTypeParameterBuilder/Overview/source.cs
+++ b/snippets/csharp/System.Reflection.Emit/GenericTypeParameterBuilder/Overview/source.cs
@@ -24,14 +24,14 @@ public static void Main()
{
// Define a dynamic assembly to contain the sample type. The
// assembly will not be run, but only saved to disk, so
- // AssemblyBuilderAccess.Save is specified.
+ // AssemblyBuilderAccess.Run is specified.
//
//
AppDomain myDomain = AppDomain.CurrentDomain;
AssemblyName myAsmName = new AssemblyName("GenericEmitExample1");
AssemblyBuilder myAssembly =
- myDomain.DefineDynamicAssembly(myAsmName,
- AssemblyBuilderAccess.RunAndSave);
+ AssemblyBuilder.DefineDynamicAssembly(myAsmName,
+ AssemblyBuilderAccess.Run);
//
// An assembly is made up of executable modules. For a single-
@@ -40,8 +40,7 @@ public static void Main()
//
//
ModuleBuilder myModule =
- myAssembly.DefineDynamicModule(myAsmName.Name,
- myAsmName.Name + ".dll");
+ myAssembly.DefineDynamicModule(myAsmName.Name);
//
// Get type objects for the base class trivial interfaces to
@@ -186,7 +185,6 @@ public static void Main()
// Create the type and save the assembly.
//
Type finished = myType.CreateType();
- myAssembly.Save(myAsmName.Name+".dll");
//
// Invoke the method.
diff --git a/snippets/csharp/System.Reflection.Emit/ILGenerator/BeginCatchBlock/source.cs b/snippets/csharp/System.Reflection.Emit/ILGenerator/BeginCatchBlock/source.cs
index e9051493bd4..48c92a95395 100644
--- a/snippets/csharp/System.Reflection.Emit/ILGenerator/BeginCatchBlock/source.cs
+++ b/snippets/csharp/System.Reflection.Emit/ILGenerator/BeginCatchBlock/source.cs
@@ -10,11 +10,10 @@ public static void Main()
AppDomain current = AppDomain.CurrentDomain;
AssemblyName myAsmName = new AssemblyName();
myAsmName.Name = "AdderExceptionAsm";
- AssemblyBuilder myAsmBldr = current.DefineDynamicAssembly(myAsmName,
- AssemblyBuilderAccess.RunAndSave);
+ AssemblyBuilder myAsmBldr = AssemblyBuilder.DefineDynamicAssembly(myAsmName,
+ AssemblyBuilderAccess.Run);
- ModuleBuilder myModBldr = myAsmBldr.DefineDynamicModule(myAsmName.Name,
- myAsmName.Name + ".dll");
+ ModuleBuilder myModBldr = myAsmBldr.DefineDynamicModule(myAsmName.Name);
TypeBuilder myTypeBldr = myModBldr.DefineType("Adder");
diff --git a/snippets/csharp/System.Reflection.Emit/ILGenerator/BeginFaultBlock/ilgenerator_beginfaultblock.cs b/snippets/csharp/System.Reflection.Emit/ILGenerator/BeginFaultBlock/ilgenerator_beginfaultblock.cs
index 321f5d0139d..32dae01b196 100644
--- a/snippets/csharp/System.Reflection.Emit/ILGenerator/BeginFaultBlock/ilgenerator_beginfaultblock.cs
+++ b/snippets/csharp/System.Reflection.Emit/ILGenerator/BeginFaultBlock/ilgenerator_beginfaultblock.cs
@@ -25,7 +25,7 @@ public static Type AddType()
// Create dynamic assembly.
AppDomain myAppDomain = Thread.GetDomain();
- AssemblyBuilder myAssemblyBuilder = myAppDomain.DefineDynamicAssembly(myAssemblyName,
+ AssemblyBuilder myAssemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(myAssemblyName,
AssemblyBuilderAccess.Run);
// Create a dynamic module.
diff --git a/snippets/csharp/System.Reflection.Emit/ILGenerator/BeginFinallyBlock/ilgenerator_beginfinallyblock_2.cs b/snippets/csharp/System.Reflection.Emit/ILGenerator/BeginFinallyBlock/ilgenerator_beginfinallyblock_2.cs
index 6097b0c40bd..9121288b81c 100644
--- a/snippets/csharp/System.Reflection.Emit/ILGenerator/BeginFinallyBlock/ilgenerator_beginfinallyblock_2.cs
+++ b/snippets/csharp/System.Reflection.Emit/ILGenerator/BeginFinallyBlock/ilgenerator_beginfinallyblock_2.cs
@@ -27,7 +27,7 @@ public static Type AddType()
// Create dynamic assembly.
AppDomain myAppDomain = Thread.GetDomain();
- AssemblyBuilder myAssemblyBuilder = myAppDomain.DefineDynamicAssembly(myAssemblyName,
+ AssemblyBuilder myAssemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(myAssemblyName,
AssemblyBuilderAccess.Run);
// Create a dynamic module.
diff --git a/snippets/csharp/System.Reflection.Emit/ILGenerator/BeginScope/ilgenerator_begin_endscope.cs b/snippets/csharp/System.Reflection.Emit/ILGenerator/BeginScope/ilgenerator_begin_endscope.cs
index 22787ae9788..9a1d6ca926d 100644
--- a/snippets/csharp/System.Reflection.Emit/ILGenerator/BeginScope/ilgenerator_begin_endscope.cs
+++ b/snippets/csharp/System.Reflection.Emit/ILGenerator/BeginScope/ilgenerator_begin_endscope.cs
@@ -31,10 +31,10 @@ public static void Main()
myAssemblyName.Name = "SampleAssembly";
// Create a dynamic assembly 'myAssembly' with access mode 'Run'.
- AssemblyBuilder myAssembly = myAppDomain.DefineDynamicAssembly(
+ AssemblyBuilder myAssembly = AssemblyBuilder.DefineDynamicAssembly(
myAssemblyName, AssemblyBuilderAccess.Run);
// Create a dynamic module 'myModule' in 'myAssembly'.
- ModuleBuilder myModule=myAssembly.DefineDynamicModule("MyDynamicModule",true);
+ ModuleBuilder myModule=myAssembly.DefineDynamicModule("MyDynamicModule");
// Define a public class 'MyDynamicClass'.
TypeBuilder myTypeBuilder = myModule.DefineType("MyDynamicClass",
TypeAttributes.Public);
diff --git a/snippets/csharp/System.Reflection.Emit/ILGenerator/DeclareLocal/localbuilder_sample_4.cs b/snippets/csharp/System.Reflection.Emit/ILGenerator/DeclareLocal/localbuilder_sample_4.cs
index f443656307a..93ffa942e9a 100644
--- a/snippets/csharp/System.Reflection.Emit/ILGenerator/DeclareLocal/localbuilder_sample_4.cs
+++ b/snippets/csharp/System.Reflection.Emit/ILGenerator/DeclareLocal/localbuilder_sample_4.cs
@@ -29,14 +29,13 @@ public static void Main()
myAssemblyName.Name = "SampleAssembly";
AssemblyBuilder myAssembly =
- Thread.GetDomain().DefineDynamicAssembly(myAssemblyName,
- AssemblyBuilderAccess.RunAndSave);
+ AssemblyBuilder.DefineDynamicAssembly(myAssemblyName,
+ AssemblyBuilderAccess.Run);
// Create a module. For a single-file assembly the module
// name is usually the same as the assembly name.
ModuleBuilder myModule =
- myAssembly.DefineDynamicModule(myAssemblyName.Name,
- myAssemblyName.Name + ".dll", true);
+ myAssembly.DefineDynamicModule(myAssemblyName.Name);
// Define a public class 'Example'.
TypeBuilder myTypeBuilder =
@@ -61,7 +60,7 @@ public static void Main()
Console.WriteLine("local 'myString' type is: {0}", myLB1.LocalType);
LocalBuilder myLB2 = myMethodIL.DeclareLocal(typeof(int));
- myLB2.SetLocalSymInfo("myInt", 1, 2);
+ myLB2.SetLocalSymInfo("myInt");
Console.WriteLine("local 'myInt' type is: {0}", myLB2.LocalType);
//
@@ -79,7 +78,6 @@ public static void Main()
Type myType1 = myTypeBuilder.CreateType();
Console.WriteLine("'Example' is created.");
- myAssembly.Save(myAssemblyName.Name + ".dll");
Console.WriteLine( "'{0}' is created.", myAssemblyName.Name + ".dll" );
// Invoke 'Function1' method of 'Example', passing the value 42.
@@ -97,4 +95,4 @@ public static void Main()
'SampleAssembly.dll' is created.
Example.Function1 returned: string value
*/
-//
\ No newline at end of file
+//
diff --git a/snippets/csharp/System.Reflection.Emit/ILGenerator/DefineLabel/source.cs b/snippets/csharp/System.Reflection.Emit/ILGenerator/DefineLabel/source.cs
index fd8bc6de36c..90cdbb3708c 100644
--- a/snippets/csharp/System.Reflection.Emit/ILGenerator/DefineLabel/source.cs
+++ b/snippets/csharp/System.Reflection.Emit/ILGenerator/DefineLabel/source.cs
@@ -12,7 +12,7 @@ public static Type BuildAdderType() {
AppDomain myDomain = Thread.GetDomain();
AssemblyName myAsmName = new AssemblyName();
myAsmName.Name = "AdderExceptionAsm";
- AssemblyBuilder myAsmBldr = myDomain.DefineDynamicAssembly(myAsmName,
+ AssemblyBuilder myAsmBldr = AssemblyBuilder.DefineDynamicAssembly(myAsmName,
AssemblyBuilderAccess.Run);
ModuleBuilder myModBldr = myAsmBldr.DefineDynamicModule("AdderExceptionMod");
diff --git a/snippets/csharp/System.Reflection.Emit/ILGenerator/Emit/source.cs b/snippets/csharp/System.Reflection.Emit/ILGenerator/Emit/source.cs
index db9aae0821d..f1847457c63 100644
--- a/snippets/csharp/System.Reflection.Emit/ILGenerator/Emit/source.cs
+++ b/snippets/csharp/System.Reflection.Emit/ILGenerator/Emit/source.cs
@@ -12,7 +12,7 @@ public static Type BuildMyType()
AssemblyName myAsmName = new AssemblyName();
myAsmName.Name = "MyDynamicAssembly";
- AssemblyBuilder myAsmBuilder = myDomain.DefineDynamicAssembly(
+ AssemblyBuilder myAsmBuilder = AssemblyBuilder.DefineDynamicAssembly(
myAsmName,
AssemblyBuilderAccess.Run);
ModuleBuilder myModBuilder = myAsmBuilder.DefineDynamicModule(
diff --git a/snippets/csharp/System.Reflection.Emit/ILGenerator/EmitCall/source.cs b/snippets/csharp/System.Reflection.Emit/ILGenerator/EmitCall/source.cs
index 7bb01c8e699..a1ee85d6d6d 100644
--- a/snippets/csharp/System.Reflection.Emit/ILGenerator/EmitCall/source.cs
+++ b/snippets/csharp/System.Reflection.Emit/ILGenerator/EmitCall/source.cs
@@ -10,7 +10,7 @@ static void Main()
string name = "InMemory";
AssemblyBuilder asmBldr =
- AppDomain.CurrentDomain.DefineDynamicAssembly(new AssemblyName(name),
+ AssemblyBuilder.DefineDynamicAssembly(new AssemblyName(name),
AssemblyBuilderAccess.Run);
ModuleBuilder modBldr = asmBldr.DefineDynamicModule(name);
diff --git a/snippets/csharp/System.Reflection.Emit/ILGenerator/EmitWriteLine/source.cs b/snippets/csharp/System.Reflection.Emit/ILGenerator/EmitWriteLine/source.cs
index 8630284ef04..edb7c2ed032 100644
--- a/snippets/csharp/System.Reflection.Emit/ILGenerator/EmitWriteLine/source.cs
+++ b/snippets/csharp/System.Reflection.Emit/ILGenerator/EmitWriteLine/source.cs
@@ -15,12 +15,11 @@ public static Type CreateDynamicType() {
AssemblyName myAsmName = new AssemblyName();
myAsmName.Name = "MyDynamicAssembly";
- AssemblyBuilder myAsmBuilder = myDomain.DefineDynamicAssembly(
+ AssemblyBuilder myAsmBuilder = AssemblyBuilder.DefineDynamicAssembly(
myAsmName,
AssemblyBuilderAccess.Run);
- ModuleBuilder pointModule = myAsmBuilder.DefineDynamicModule("PointModule",
- "Point.dll");
+ ModuleBuilder pointModule = myAsmBuilder.DefineDynamicModule("PointModule");
TypeBuilder pointTypeBld = pointModule.DefineType("Point",
TypeAttributes.Public);
diff --git a/snippets/csharp/System.Reflection.Emit/MethodBuilder/DeclaringType/methodbuilderclass.cs b/snippets/csharp/System.Reflection.Emit/MethodBuilder/DeclaringType/methodbuilderclass.cs
index fe3ada6273c..b661eb65383 100644
--- a/snippets/csharp/System.Reflection.Emit/MethodBuilder/DeclaringType/methodbuilderclass.cs
+++ b/snippets/csharp/System.Reflection.Emit/MethodBuilder/DeclaringType/methodbuilderclass.cs
@@ -25,11 +25,11 @@ public static void Main()
myAssemblyName.Name = "MyDynamicAssembly";
// Create the dynamic assembly and set its access mode to 'Save'.
- AssemblyBuilder myAssemblyBuilder = myAppDomain.DefineDynamicAssembly(
- myAssemblyName, AssemblyBuilderAccess.Save);
+ AssemblyBuilder myAssemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(
+ myAssemblyName, AssemblyBuilderAccess.Run);
// Create a dynamic module 'myModuleBuilder'.
ModuleBuilder myModuleBuilder =
- myAssemblyBuilder.DefineDynamicModule("MyDynamicModule", true);
+ myAssemblyBuilder.DefineDynamicModule("MyDynamicModule");
// Define a public class 'MyDynamicClass'.
TypeBuilder myTypeBuilder = myModuleBuilder.DefineType("MyDynamicClass",
TypeAttributes.Public);
@@ -62,8 +62,6 @@ public static void Main()
// Print the 'Attribute', 'Signature' of 'myMethodBuilder'.
Console.WriteLine("\nThe Attribute of 'MyDynamicMethod' is :{0}" ,
myMethodBuilder.Attributes);
- Console.WriteLine("\nThe Signature of 'MyDynamicMethod' is : \n"
- + myMethodBuilder.Signature);
}
catch(Exception e)
{
diff --git a/snippets/csharp/System.Reflection.Emit/MethodBuilder/DefineGenericParameters/source.cs b/snippets/csharp/System.Reflection.Emit/MethodBuilder/DefineGenericParameters/source.cs
index 80f1b203179..5a2aaa590c1 100644
--- a/snippets/csharp/System.Reflection.Emit/MethodBuilder/DefineGenericParameters/source.cs
+++ b/snippets/csharp/System.Reflection.Emit/MethodBuilder/DefineGenericParameters/source.cs
@@ -15,19 +15,16 @@ public static void Main()
new AssemblyName("DemoMethodBuilder1");
AppDomain domain = AppDomain.CurrentDomain;
AssemblyBuilder demoAssembly =
- domain.DefineDynamicAssembly(
+ AssemblyBuilder.DefineDynamicAssembly(
asmName,
- AssemblyBuilderAccess.RunAndSave
+ AssemblyBuilderAccess.Run
);
// Define the module that contains the code. For an
// assembly with one module, the module name is the
// assembly name plus a file extension.
ModuleBuilder demoModule =
- demoAssembly.DefineDynamicModule(
- asmName.Name,
- asmName.Name + ".dll"
- );
+ demoAssembly.DefineDynamicModule(asmName.Name);
TypeBuilder demoType = demoModule.DefineType(
"DemoType",
@@ -106,7 +103,6 @@ public static void Main()
//
// Save the assembly, so it can be examined with Ildasm.exe.
- demoAssembly.Save(asmName.Name + ".dll");
}
}
diff --git a/snippets/csharp/System.Reflection.Emit/MethodBuilder/GetILGenerator/source.cs b/snippets/csharp/System.Reflection.Emit/MethodBuilder/GetILGenerator/source.cs
index 957a5def854..aeef8235f83 100644
--- a/snippets/csharp/System.Reflection.Emit/MethodBuilder/GetILGenerator/source.cs
+++ b/snippets/csharp/System.Reflection.Emit/MethodBuilder/GetILGenerator/source.cs
@@ -17,12 +17,11 @@ public static Type DynamicDotProductGen()
AssemblyName myAsmName = new AssemblyName();
myAsmName.Name = "IntVectorAsm";
- AssemblyBuilder myAsmBuilder = myDomain.DefineDynamicAssembly(
+ AssemblyBuilder myAsmBuilder = AssemblyBuilder.DefineDynamicAssembly(
myAsmName,
- AssemblyBuilderAccess.RunAndSave);
+ AssemblyBuilderAccess.Run);
- ModuleBuilder IntVectorModule = myAsmBuilder.DefineDynamicModule("IntVectorModule",
- "Vector.dll");
+ ModuleBuilder IntVectorModule = myAsmBuilder.DefineDynamicModule("IntVectorModule");
TypeBuilder ivTypeBld = IntVectorModule.DefineType("IntVector",
TypeAttributes.Public);
diff --git a/snippets/csharp/System.Reflection.Emit/MethodBuilder/MakeGenericMethod/source.cs b/snippets/csharp/System.Reflection.Emit/MethodBuilder/MakeGenericMethod/source.cs
index f4511bb9c02..e8431fc8d9e 100644
--- a/snippets/csharp/System.Reflection.Emit/MethodBuilder/MakeGenericMethod/source.cs
+++ b/snippets/csharp/System.Reflection.Emit/MethodBuilder/MakeGenericMethod/source.cs
@@ -12,7 +12,7 @@ public static void Main()
//
AssemblyName aName = new AssemblyName("MyDynamic");
AssemblyBuilder ab =
- AppDomain.CurrentDomain.DefineDynamicAssembly(
+ AssemblyBuilder.DefineDynamicAssembly(
aName,
AssemblyBuilderAccess.Run);
ModuleBuilder mb = ab.DefineDynamicModule(aName.Name);
diff --git a/snippets/csharp/System.Reflection.Emit/MethodBuilder/Overview/source.cs b/snippets/csharp/System.Reflection.Emit/MethodBuilder/Overview/source.cs
index b5e8426afcd..012c20cbf5f 100644
--- a/snippets/csharp/System.Reflection.Emit/MethodBuilder/Overview/source.cs
+++ b/snippets/csharp/System.Reflection.Emit/MethodBuilder/Overview/source.cs
@@ -53,12 +53,11 @@ public static void Main()
AssemblyName asmName = new AssemblyName();
asmName.Name = "MyDynamicAsm";
- AssemblyBuilder myAsmBuilder = myDomain.DefineDynamicAssembly(
+ AssemblyBuilder myAsmBuilder = AssemblyBuilder.DefineDynamicAssembly(
asmName,
- AssemblyBuilderAccess.RunAndSave);
+ AssemblyBuilderAccess.Run);
- ModuleBuilder myModule = myAsmBuilder.DefineDynamicModule("MyDynamicAsm",
- "MyDynamicAsm.dll");
+ ModuleBuilder myModule = myAsmBuilder.DefineDynamicModule("MyDynamicAsm");
TypeBuilder myTypeBld = myModule.DefineType("MyDynamicType",
TypeAttributes.Public);
@@ -114,7 +113,6 @@ public static void Main()
// of manifest contents appears, click on "MyDynamicType" and then on the name of
// of the method you provided during execution.
- myAsmBuilder.Save("MyDynamicAsm.dll");
MethodInfo myMthdInfo = myType.GetMethod(myMthdName);
Console.WriteLine("Your Dynamic Method: {0};", myMthdInfo.ToString());
diff --git a/snippets/csharp/System.Reflection.Emit/MethodBuilder/SetSignature/source.cs b/snippets/csharp/System.Reflection.Emit/MethodBuilder/SetSignature/source.cs
index 35a8ed81793..46dabe7039c 100644
--- a/snippets/csharp/System.Reflection.Emit/MethodBuilder/SetSignature/source.cs
+++ b/snippets/csharp/System.Reflection.Emit/MethodBuilder/SetSignature/source.cs
@@ -24,11 +24,9 @@ public static void Main()
AppDomain myDomain = AppDomain.CurrentDomain;
AssemblyName myAsmName =
new AssemblyName("TypeBuilderGetFieldExample");
- AssemblyBuilder myAssembly = myDomain.DefineDynamicAssembly(
- myAsmName, AssemblyBuilderAccess.Save);
- ModuleBuilder myModule = myAssembly.DefineDynamicModule(
- myAsmName.Name,
- myAsmName.Name + ".exe");
+ AssemblyBuilder myAssembly = AssemblyBuilder.DefineDynamicAssembly(
+ myAsmName, AssemblyBuilderAccess.Run);
+ ModuleBuilder myModule = myAssembly.DefineDynamicModule(myAsmName.Name);
// Define the sample type.
TypeBuilder myType = myModule.DefineType("Sample",
@@ -143,10 +141,8 @@ public static void Main()
myType.CreateType();
dummy.CreateType();
- myAssembly.SetEntryPoint(entryPoint);
- myAssembly.Save(myAsmName.Name + ".exe");
Console.WriteLine(myAsmName.Name + ".exe has been saved.");
}
}
-//
\ No newline at end of file
+//
diff --git a/snippets/csharp/System.Reflection.Emit/ModuleBuilder/CreateGlobalFunctions/modulebuilder_createglobalfunctions.cs b/snippets/csharp/System.Reflection.Emit/ModuleBuilder/CreateGlobalFunctions/modulebuilder_createglobalfunctions.cs
index 6df9880c3c3..f829dc91387 100644
--- a/snippets/csharp/System.Reflection.Emit/ModuleBuilder/CreateGlobalFunctions/modulebuilder_createglobalfunctions.cs
+++ b/snippets/csharp/System.Reflection.Emit/ModuleBuilder/CreateGlobalFunctions/modulebuilder_createglobalfunctions.cs
@@ -34,8 +34,8 @@ public CodeGenerator()
// Define a dynamic assembly in the 'currentDomain'.
myAssemblyBuilder =
- currentDomain.DefineDynamicAssembly
- (myAssemblyName, AssemblyBuilderAccess.RunAndSave);
+ AssemblyBuilder.DefineDynamicAssembly
+ (myAssemblyName, AssemblyBuilderAccess.Run);
// Define a dynamic module in "TempAssembly" assembly.
myModuleBuilder = myAssemblyBuilder.DefineDynamicModule("TempModule");
diff --git a/snippets/csharp/System.Reflection.Emit/ModuleBuilder/DefineInitializedData/modulebuilder_defineinitializeddata.cs b/snippets/csharp/System.Reflection.Emit/ModuleBuilder/DefineInitializedData/modulebuilder_defineinitializeddata.cs
index 487e4d8c972..09ae4079b76 100644
--- a/snippets/csharp/System.Reflection.Emit/ModuleBuilder/DefineInitializedData/modulebuilder_defineinitializeddata.cs
+++ b/snippets/csharp/System.Reflection.Emit/ModuleBuilder/DefineInitializedData/modulebuilder_defineinitializeddata.cs
@@ -30,7 +30,7 @@ public CodeGenerator()
// Define a dynamic assembly in the 'currentDomain'.
myAssemblyBuilder =
- currentDomain.DefineDynamicAssembly
+ AssemblyBuilder.DefineDynamicAssembly
(myAssemblyName, AssemblyBuilderAccess.Run);
// Define a dynamic module in "TempAssembly" assembly.
diff --git a/snippets/csharp/System.Reflection.Emit/ModuleBuilder/DefinePInvokeMethod/modulebuilder_definepinvokemethod1.cs b/snippets/csharp/System.Reflection.Emit/ModuleBuilder/DefinePInvokeMethod/modulebuilder_definepinvokemethod1.cs
index 6d774eb9ba7..40d2cf49710 100644
--- a/snippets/csharp/System.Reflection.Emit/ModuleBuilder/DefinePInvokeMethod/modulebuilder_definepinvokemethod1.cs
+++ b/snippets/csharp/System.Reflection.Emit/ModuleBuilder/DefinePInvokeMethod/modulebuilder_definepinvokemethod1.cs
@@ -23,7 +23,7 @@ static void Main()
// Define a dynamic assembly in the current application domain.
AssemblyBuilder myAssemblyBuilder =
- AppDomain.CurrentDomain.DefineDynamicAssembly(
+ AssemblyBuilder.DefineDynamicAssembly(
myAssemblyName, AssemblyBuilderAccess.Run);
// Define a dynamic module in "TempAssembly" assembly.
diff --git a/snippets/csharp/System.Reflection.Emit/ModuleBuilder/DefineType/source.cs b/snippets/csharp/System.Reflection.Emit/ModuleBuilder/DefineType/source.cs
index e60f499a95a..0704eac52c4 100644
--- a/snippets/csharp/System.Reflection.Emit/ModuleBuilder/DefineType/source.cs
+++ b/snippets/csharp/System.Reflection.Emit/ModuleBuilder/DefineType/source.cs
@@ -9,13 +9,11 @@ public void Method()
//
AssemblyName asmname = new AssemblyName();
asmname.Name = "assemfilename.exe";
- AssemblyBuilder asmbuild = System.Threading.Thread.GetDomain().
- DefineDynamicAssembly(asmname, AssemblyBuilderAccess.RunAndSave);
- ModuleBuilder modbuild = asmbuild.DefineDynamicModule( "modulename",
- "assemfilename.exe" );
+ AssemblyBuilder asmbuild =
+ AssemblyBuilder.DefineDynamicAssembly(asmname, AssemblyBuilderAccess.Run);
+ ModuleBuilder modbuild = asmbuild.DefineDynamicModule("modulename");
TypeBuilder typebuild1 = modbuild.DefineType( "typename" );
typebuild1.CreateType();
- asmbuild.Save( "assemfilename.exe" );
//
}
}
diff --git a/snippets/csharp/System.Reflection.Emit/ModuleBuilder/GetArrayMethod/modulebuilder_getarraymethod.cs b/snippets/csharp/System.Reflection.Emit/ModuleBuilder/GetArrayMethod/modulebuilder_getarraymethod.cs
index eb1a4b68e96..6915abf5c5e 100644
--- a/snippets/csharp/System.Reflection.Emit/ModuleBuilder/GetArrayMethod/modulebuilder_getarraymethod.cs
+++ b/snippets/csharp/System.Reflection.Emit/ModuleBuilder/GetArrayMethod/modulebuilder_getarraymethod.cs
@@ -23,8 +23,8 @@ internal CodeGenerator()
AssemblyName myAssemblyName = new AssemblyName();
myAssemblyName.Name = "TempAssembly";
// Define a dynamic assembly in the current application domain.
- myAssemblyBuilder = myCurrentDomain.DefineDynamicAssembly
- (myAssemblyName, AssemblyBuilderAccess.RunAndSave);
+ myAssemblyBuilder = AssemblyBuilder.DefineDynamicAssembly
+ (myAssemblyName, AssemblyBuilderAccess.Run);
//
//
// Define a dynamic module in "TempAssembly" assembly.
@@ -42,14 +42,8 @@ internal CodeGenerator()
Type[] parameterTypes = {typeof(Array)};
// Get the 'MethodInfo' object corresponding to 'Sort' method of 'Array' class.
MethodInfo myMethodInfo=myModuleBuilder.GetArrayMethod(
- myArrayClass.GetType(),"Sort",CallingConventions.Standard,
- null,parameterTypes);
- // Get the token corresponding to 'Sort' method of 'Array' class.
- MethodToken myMethodToken=myModuleBuilder.GetArrayMethodToken(
myArrayClass.GetType(),"Sort",CallingConventions.Standard,
null,parameterTypes);
- Console.WriteLine("Token used by module to identify the 'Sort' method"
- + " of 'Array' class is : {0:x} ",myMethodToken.Token);
ILGenerator methodIL = myMethod.GetILGenerator();
methodIL.Emit(OpCodes.Ldarg_1);
diff --git a/snippets/csharp/System.Reflection.Emit/ModuleBuilder/Overview/modulebuilder.cs b/snippets/csharp/System.Reflection.Emit/ModuleBuilder/Overview/modulebuilder.cs
index 7790467aaca..c7b42daf51f 100644
--- a/snippets/csharp/System.Reflection.Emit/ModuleBuilder/Overview/modulebuilder.cs
+++ b/snippets/csharp/System.Reflection.Emit/ModuleBuilder/Overview/modulebuilder.cs
@@ -24,7 +24,7 @@ public CodeGenerator()
myAssemblyName.Name = "TempAssembly";
// Define a dynamic assembly in the current application domain.
- myAssemblyBuilder = myCurrentDomain.DefineDynamicAssembly
+ myAssemblyBuilder = AssemblyBuilder.DefineDynamicAssembly
(myAssemblyName, AssemblyBuilderAccess.Run);
// Define a dynamic module in this assembly.
@@ -75,11 +75,6 @@ public static void Main()
Type myType = myModuleBuilder.GetType("TempClass");
MethodInfo myMethodInfo =
myType.GetMethod("MyMethod");
- // Get the token used to identify the method within this module.
- MethodToken myMethodToken =
- myModuleBuilder.GetMethodToken(myMethodInfo);
- Console.WriteLine("Token used to identify the method of 'myType'"
- + " within the module is {0:x}",myMethodToken.Token);
object[] args={"Hello."};
object myObject = Activator.CreateInstance(myType,null,null);
myMethodInfo.Invoke(myObject,args);
diff --git a/snippets/csharp/System.Reflection.Emit/ParameterBuilder/Overview/source.cs b/snippets/csharp/System.Reflection.Emit/ParameterBuilder/Overview/source.cs
index 742bf367cd0..068aed2da4b 100644
--- a/snippets/csharp/System.Reflection.Emit/ParameterBuilder/Overview/source.cs
+++ b/snippets/csharp/System.Reflection.Emit/ParameterBuilder/Overview/source.cs
@@ -16,7 +16,7 @@ public static Type BuildCustomerDataType()
AssemblyName myAsmName = new AssemblyName();
myAsmName.Name = "MyDynamicAssembly";
- AssemblyBuilder myAsmBuilder = myDomain.DefineDynamicAssembly(myAsmName,
+ AssemblyBuilder myAsmBuilder = AssemblyBuilder.DefineDynamicAssembly(myAsmName,
AssemblyBuilderAccess.Run);
ModuleBuilder myModBuilder = myAsmBuilder.DefineDynamicModule("MyMod");
diff --git a/snippets/csharp/System.Reflection.Emit/PropertyBuilder/Overview/source.cs b/snippets/csharp/System.Reflection.Emit/PropertyBuilder/Overview/source.cs
index 2a2860752dd..7898a9e15ae 100644
--- a/snippets/csharp/System.Reflection.Emit/PropertyBuilder/Overview/source.cs
+++ b/snippets/csharp/System.Reflection.Emit/PropertyBuilder/Overview/source.cs
@@ -12,12 +12,12 @@ public static Type BuildDynamicTypeWithProperties()
AssemblyName myAsmName = new AssemblyName();
myAsmName.Name = "MyDynamicAssembly";
- // To generate a persistable assembly, specify AssemblyBuilderAccess.RunAndSave.
- AssemblyBuilder myAsmBuilder = myDomain.DefineDynamicAssembly(myAsmName,
- AssemblyBuilderAccess.RunAndSave);
+ // To generate a persistable assembly, specify AssemblyBuilderAccess.Run.
+ AssemblyBuilder myAsmBuilder = AssemblyBuilder.DefineDynamicAssembly(myAsmName,
+ AssemblyBuilderAccess.Run);
// Generate a persistable single-module assembly.
ModuleBuilder myModBuilder =
- myAsmBuilder.DefineDynamicModule(myAsmName.Name, myAsmName.Name + ".dll");
+ myAsmBuilder.DefineDynamicModule(myAsmName.Name);
TypeBuilder myTypeBuilder = myModBuilder.DefineType("CustomerData",
TypeAttributes.Public);
@@ -77,7 +77,6 @@ public static Type BuildDynamicTypeWithProperties()
// Save the assembly so it can be examined with Ildasm.exe,
// or referenced by a test program.
- myAsmBuilder.Save(myAsmName.Name + ".dll");
return retval;
}
diff --git a/snippets/csharp/System.Reflection.Emit/PropertyBuilder/SetGetMethod/propertybuilder_setgetmethod_4.cs b/snippets/csharp/System.Reflection.Emit/PropertyBuilder/SetGetMethod/propertybuilder_setgetmethod_4.cs
index b3685521cf3..6422888702e 100644
--- a/snippets/csharp/System.Reflection.Emit/PropertyBuilder/SetGetMethod/propertybuilder_setgetmethod_4.cs
+++ b/snippets/csharp/System.Reflection.Emit/PropertyBuilder/SetGetMethod/propertybuilder_setgetmethod_4.cs
@@ -24,7 +24,7 @@ public class App
public static void Main()
{
// Create the "HelloWorld" type in an assembly with mode 'RunAndSave'.
- Type helloWorldType = CreateCallee(Thread.GetDomain(), AssemblyBuilderAccess.RunAndSave);
+ Type helloWorldType = CreateCallee(Thread.GetDomain(), AssemblyBuilderAccess.Run);
// Create an instance of the "HelloWorld" class.
Object helloWorld = Activator.CreateInstance(helloWorldType, new object[] { "HelloWorld" });
@@ -53,7 +53,6 @@ public static void Main()
AssemblyBuilder myAssembly = (AssemblyBuilder) helloWorldType.Assembly;
// Save to disk.
- myAssembly.Save("EmittedAssembly.dll");
}
// Create the callee transient dynamic assembly.
@@ -64,7 +63,7 @@ private static Type CreateCallee(AppDomain myAppDomain, AssemblyBuilderAccess ac
myAssemblyName.Name = "EmittedAssembly";
// Create the callee dynamic assembly.
AssemblyBuilder myAssemblyBuilder =
- myAppDomain.DefineDynamicAssembly(myAssemblyName, access);
+ AssemblyBuilder.DefineDynamicAssembly(myAssemblyName, access);
// Create a dynamic module named "EmittedModule" in the callee assembly.
ModuleBuilder myModule;
if (access == AssemblyBuilderAccess.Run)
@@ -73,7 +72,7 @@ private static Type CreateCallee(AppDomain myAppDomain, AssemblyBuilderAccess ac
}
else
{
- myModule = myAssemblyBuilder.DefineDynamicModule("EmittedModule", "EmittedModule.mod");
+ myModule = myAssemblyBuilder.DefineDynamicModule("EmittedModule");
}
//
// Define a public class named "HelloWorld" in the assembly.
diff --git a/snippets/csharp/System.Reflection.Emit/TypeBuilder/AddInterfaceImplementation/typebuilder_sample_4.cs b/snippets/csharp/System.Reflection.Emit/TypeBuilder/AddInterfaceImplementation/typebuilder_sample_4.cs
index f29426340d1..102fae83488 100644
--- a/snippets/csharp/System.Reflection.Emit/TypeBuilder/AddInterfaceImplementation/typebuilder_sample_4.cs
+++ b/snippets/csharp/System.Reflection.Emit/TypeBuilder/AddInterfaceImplementation/typebuilder_sample_4.cs
@@ -30,7 +30,7 @@ public static void Main()
Console.WriteLine("----------------------");
// Create 'helloWorldType' .
Type helloWorldType = CreateDynamicAssembly(Thread.GetDomain(),
- AssemblyBuilderAccess.RunAndSave);
+ AssemblyBuilderAccess.Run);
// Create an instance of 'HelloWorld' class.
Object helloWorld = Activator.CreateInstance(helloWorldType,
new Object[] { "Called HelloWorld" });
@@ -41,7 +41,6 @@ public static void Main()
// Get defined field in the class.
Console.WriteLine("Defined Field: " + helloWorldType.GetField("myGreeting").Name);
AssemblyBuilder myAssemblyBuilder = (AssemblyBuilder)helloWorldType.Assembly;
- myAssemblyBuilder.Save("EmittedAssembly.dll");
}
// Declare the interface.
public interface IHello
@@ -56,11 +55,10 @@ private static Type CreateDynamicAssembly(AppDomain myAppDomain, AssemblyBuilder
AssemblyName myAssemblyName = new AssemblyName();
myAssemblyName.Name = "EmittedAssembly";
// Create the dynamic assembly.
- AssemblyBuilder myAssemblyBuilder = myAppDomain.DefineDynamicAssembly(myAssemblyName, myAccess);
+ AssemblyBuilder myAssemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(myAssemblyName, myAccess);
// Create a dynamic module named 'CalleeModule' in the assembly.
ModuleBuilder myModuleBuilder;
- myModuleBuilder = myAssemblyBuilder.DefineDynamicModule("EmittedModule",
- "EmittedModule.mod");
+ myModuleBuilder = myAssemblyBuilder.DefineDynamicModule("EmittedModule");
//
//
// Define a public class named 'myHelloWorld' in the assembly.
diff --git a/snippets/csharp/System.Reflection.Emit/TypeBuilder/CreateType/nestedenum.cs b/snippets/csharp/System.Reflection.Emit/TypeBuilder/CreateType/nestedenum.cs
index 1dfc6362b06..08e6ed567e1 100644
--- a/snippets/csharp/System.Reflection.Emit/TypeBuilder/CreateType/nestedenum.cs
+++ b/snippets/csharp/System.Reflection.Emit/TypeBuilder/CreateType/nestedenum.cs
@@ -16,8 +16,8 @@ internal class NestedEnum {
public static void Main(String[] args) {
AssemblyName asmName = new AssemblyName();
asmName.Name = "NestedEnum";
- AssemblyBuilder asmBuild = Thread.GetDomain().DefineDynamicAssembly(asmName, AssemblyBuilderAccess.RunAndSave);
- ModuleBuilder modBuild = asmBuild.DefineDynamicModule("ModuleOne", "NestedEnum.dll");
+ AssemblyBuilder asmBuild = AssemblyBuilder.DefineDynamicAssembly(asmName, AssemblyBuilderAccess.Run);
+ ModuleBuilder modBuild = asmBuild.DefineDynamicModule("ModuleOne");
// Hook up the event listening.
TypeResolveHandler typeResolveHandler = new TypeResolveHandler(modBuild);
@@ -61,7 +61,6 @@ public static void Main(String[] args) {
Console.WriteLine(x.Name);
}
- asmBuild.Save( "NestedEnum.dll" );
// Remove the listener for the type resolve events.
currentDomain.TypeResolve -= resolveHandler;
diff --git a/snippets/csharp/System.Reflection.Emit/TypeBuilder/DefineMethod/typebuilder_definenestedtype1.cs b/snippets/csharp/System.Reflection.Emit/TypeBuilder/DefineMethod/typebuilder_definenestedtype1.cs
index 7eac24487a5..572ecb19f91 100644
--- a/snippets/csharp/System.Reflection.Emit/TypeBuilder/DefineMethod/typebuilder_definenestedtype1.cs
+++ b/snippets/csharp/System.Reflection.Emit/TypeBuilder/DefineMethod/typebuilder_definenestedtype1.cs
@@ -41,7 +41,7 @@ private static Type CreateCallee(AppDomain myAppDomain)
myAssemblyName.Name = "Example";
// Create the callee dynamic assembly.
AssemblyBuilder myAssembly =
- myAppDomain.DefineDynamicAssembly(myAssemblyName, AssemblyBuilderAccess.Run);
+ AssemblyBuilder.DefineDynamicAssembly(myAssemblyName, AssemblyBuilderAccess.Run);
// Create a dynamic module in the callee assembly.
ModuleBuilder myModule = myAssembly.DefineDynamicModule("EmittedModule");
// Define a public class named "MyHelloWorld".
diff --git a/snippets/csharp/System.Reflection.Emit/TypeBuilder/DefinePInvokeMethod/100656_fix.cs b/snippets/csharp/System.Reflection.Emit/TypeBuilder/DefinePInvokeMethod/100656_fix.cs
index 744a6fa9217..80da1cd6f48 100644
--- a/snippets/csharp/System.Reflection.Emit/TypeBuilder/DefinePInvokeMethod/100656_fix.cs
+++ b/snippets/csharp/System.Reflection.Emit/TypeBuilder/DefinePInvokeMethod/100656_fix.cs
@@ -11,14 +11,14 @@ public static void Main()
{
// Create the AssemblyBuilder.
AssemblyName asmName = new AssemblyName("PInvokeTest");
- AssemblyBuilder dynamicAsm = AppDomain.CurrentDomain.DefineDynamicAssembly(
+ AssemblyBuilder dynamicAsm = AssemblyBuilder.DefineDynamicAssembly(
asmName,
- AssemblyBuilderAccess.RunAndSave
+ AssemblyBuilderAccess.Run
);
// Create the module.
ModuleBuilder dynamicMod =
- dynamicAsm.DefineDynamicModule(asmName.Name, asmName.Name + ".dll");
+ dynamicAsm.DefineDynamicModule(asmName.Name);
// Create the TypeBuilder for the class that will contain the
// signature for the PInvoke call.
@@ -54,7 +54,6 @@ public static void Main()
// Produce the .dll file.
Console.WriteLine("Saving: " + asmName.Name + ".dll");
- dynamicAsm.Save(asmName.Name + ".dll");
}
}
@@ -64,4 +63,4 @@ Testing PInvoke method...
GetTickCount returned: 1312576235
Saving: PInvokeTest.dll
*/
-//
\ No newline at end of file
+//
diff --git a/snippets/csharp/System.Reflection.Emit/TypeBuilder/DefineUninitializedData/typebuilder_defineuninitializeddata.cs b/snippets/csharp/System.Reflection.Emit/TypeBuilder/DefineUninitializedData/typebuilder_defineuninitializeddata.cs
index cdab7e02a1f..b79f1c6353d 100644
--- a/snippets/csharp/System.Reflection.Emit/TypeBuilder/DefineUninitializedData/typebuilder_defineuninitializeddata.cs
+++ b/snippets/csharp/System.Reflection.Emit/TypeBuilder/DefineUninitializedData/typebuilder_defineuninitializeddata.cs
@@ -69,7 +69,7 @@ private static Type CreateCallee(AppDomain myDomain)
// Create the callee dynamic assembly.
AssemblyBuilder myAssembly =
- myDomain.DefineDynamicAssembly(myAssemblyName,AssemblyBuilderAccess.Run);
+ AssemblyBuilder.DefineDynamicAssembly(myAssemblyName,AssemblyBuilderAccess.Run);
// Create a dynamic module in the callee assembly.
ModuleBuilder myModule =
diff --git a/snippets/csharp/System.Reflection.Emit/TypeBuilder/MakeArrayType/source.cs b/snippets/csharp/System.Reflection.Emit/TypeBuilder/MakeArrayType/source.cs
index 43cd2d21207..b9be908d437 100644
--- a/snippets/csharp/System.Reflection.Emit/TypeBuilder/MakeArrayType/source.cs
+++ b/snippets/csharp/System.Reflection.Emit/TypeBuilder/MakeArrayType/source.cs
@@ -10,21 +10,19 @@ public static void Main()
{
// Define a dynamic assembly to contain the sample type. The
// assembly will not be run, but only saved to disk, so
- // AssemblyBuilderAccess.Save is specified.
+ // AssemblyBuilderAccess.Run is specified.
//
AppDomain myDomain = AppDomain.CurrentDomain;
AssemblyName myAsmName = new AssemblyName("MakeXxxTypeExample");
- AssemblyBuilder myAssembly = myDomain.DefineDynamicAssembly(
+ AssemblyBuilder myAssembly = AssemblyBuilder.DefineDynamicAssembly(
myAsmName,
- AssemblyBuilderAccess.Save);
+ AssemblyBuilderAccess.Run);
// An assembly is made up of executable modules. For a single-
// module assembly, the module name and file name are the same
// as the assembly name.
//
- ModuleBuilder myModule = myAssembly.DefineDynamicModule(
- myAsmName.Name,
- myAsmName.Name + ".dll");
+ ModuleBuilder myModule = myAssembly.DefineDynamicModule(myAsmName.Name);
// Define the sample type.
TypeBuilder myType = myModule.DefineType(
@@ -66,7 +64,6 @@ public static void Main()
// information in.
//
myType.CreateType();
- myAssembly.Save(myAsmName.Name + ".dll");
}
}
//
diff --git a/snippets/csharp/System.Reflection.Emit/TypeBuilder/MakeGenericType/remarks.cs b/snippets/csharp/System.Reflection.Emit/TypeBuilder/MakeGenericType/remarks.cs
index c6d5fe9443b..8fcb6edae26 100644
--- a/snippets/csharp/System.Reflection.Emit/TypeBuilder/MakeGenericType/remarks.cs
+++ b/snippets/csharp/System.Reflection.Emit/TypeBuilder/MakeGenericType/remarks.cs
@@ -11,7 +11,7 @@ public static void Main()
AppDomain currentDomain = AppDomain.CurrentDomain;
AssemblyName aName = new AssemblyName("TempAssembly");
- AssemblyBuilder ab = currentDomain.DefineDynamicAssembly(aName, AssemblyBuilderAccess.Run);
+ AssemblyBuilder ab = AssemblyBuilder.DefineDynamicAssembly(aName, AssemblyBuilderAccess.Run);
ModuleBuilder mb = ab.DefineDynamicModule(aName.Name);
diff --git a/snippets/csharp/System.Reflection/AssemblyCompanyAttribute/Overview/assemblybuilder_defineversioninforesource.cs b/snippets/csharp/System.Reflection/AssemblyCompanyAttribute/Overview/assemblybuilder_defineversioninforesource.cs
index 16bf31a1f8a..66f32cb6998 100644
--- a/snippets/csharp/System.Reflection/AssemblyCompanyAttribute/Overview/assemblybuilder_defineversioninforesource.cs
+++ b/snippets/csharp/System.Reflection/AssemblyCompanyAttribute/Overview/assemblybuilder_defineversioninforesource.cs
@@ -23,8 +23,8 @@ public static void Main()
// specifying that the assembly is to be saved.
//
AssemblyBuilder myAssembly =
- AppDomain.CurrentDomain.DefineDynamicAssembly(assemName,
- AssemblyBuilderAccess.Save);
+ AssemblyBuilder.DefineDynamicAssembly(assemName,
+ AssemblyBuilderAccess.Run);
// To apply an attribute to a dynamic assembly, first get the
// attribute type. The AssemblyFileVersionAttribute sets the
@@ -106,8 +106,7 @@ public static void Main()
// the module name is the assembly name.
//
ModuleBuilder myModule =
- myAssembly.DefineDynamicModule(assemName.Name,
- assemName.Name + ".exe");
+ myAssembly.DefineDynamicModule(assemName.Name);
// No types or methods are created for this example.
@@ -116,8 +115,6 @@ public static void Main()
// the assembly. Use the Windows Explorer to examine the properties
// of the .exe file.
//
- myAssembly.DefineVersionInfoResource();
- myAssembly.Save(assemName.Name + ".exe");
}
}
//
diff --git a/snippets/csharp/System.Reflection/AssemblyName/.ctor/assemblyname_constructor.cs b/snippets/csharp/System.Reflection/AssemblyName/.ctor/assemblyname_constructor.cs
index 9fac46e234a..34b404b4140 100644
--- a/snippets/csharp/System.Reflection/AssemblyName/.ctor/assemblyname_constructor.cs
+++ b/snippets/csharp/System.Reflection/AssemblyName/.ctor/assemblyname_constructor.cs
@@ -30,9 +30,9 @@ public class AssemblyName_Constructor
public static void MakeAssembly(AssemblyName myAssemblyName, string fileName)
{
// Get the assembly builder from the application domain associated with the current thread.
- AssemblyBuilder myAssemblyBuilder = Thread.GetDomain().DefineDynamicAssembly(myAssemblyName, AssemblyBuilderAccess.RunAndSave);
+ AssemblyBuilder myAssemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(myAssemblyName, AssemblyBuilderAccess.Run);
// Create a dynamic module in the assembly.
- ModuleBuilder myModuleBuilder = myAssemblyBuilder.DefineDynamicModule("MyModule", fileName);
+ ModuleBuilder myModuleBuilder = myAssemblyBuilder.DefineDynamicModule("MyModule");
// Create a type in the module.
TypeBuilder myTypeBuilder = myModuleBuilder.DefineType("MyType");
// Create a method called 'Main'.
@@ -47,8 +47,6 @@ public static void MakeAssembly(AssemblyName myAssemblyName, string fileName)
// End the creation of the type.
myTypeBuilder.CreateType();
// Set the method with name 'Main' as the entry point in the assembly.
- myAssemblyBuilder.SetEntryPoint(myMethodBuilder);
- myAssemblyBuilder.Save(fileName);
}
public static void Main()
diff --git a/snippets/csharp/System.Reflection/AssemblyName/CodeBase/assemblyname_codebase.cs b/snippets/csharp/System.Reflection/AssemblyName/CodeBase/assemblyname_codebase.cs
index 1f5ae0ea197..23fc1cd3d78 100644
--- a/snippets/csharp/System.Reflection/AssemblyName/CodeBase/assemblyname_codebase.cs
+++ b/snippets/csharp/System.Reflection/AssemblyName/CodeBase/assemblyname_codebase.cs
@@ -37,9 +37,9 @@ public class AssemblyName_CodeBase
public static void MakeAssembly(AssemblyName myAssemblyName, string fileName)
{
// Get the assembly builder from the application domain associated with the current thread.
- AssemblyBuilder myAssemblyBuilder = Thread.GetDomain().DefineDynamicAssembly(myAssemblyName, AssemblyBuilderAccess.RunAndSave);
+ AssemblyBuilder myAssemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(myAssemblyName, AssemblyBuilderAccess.Run);
// Create a dynamic module in the assembly.
- ModuleBuilder myModuleBuilder = myAssemblyBuilder.DefineDynamicModule("MyModule", fileName);
+ ModuleBuilder myModuleBuilder = myAssemblyBuilder.DefineDynamicModule("MyModule");
// Create a type in the module.
TypeBuilder myTypeBuilder = myModuleBuilder.DefineType("MyType");
// Create a method called 'Main'.
@@ -54,8 +54,6 @@ public static void MakeAssembly(AssemblyName myAssemblyName, string fileName)
// End the creation of the type.
myTypeBuilder.CreateType();
// Set the method with name 'Main' as the entry point in the assembly.
- myAssemblyBuilder.SetEntryPoint(myMethodBuilder);
- myAssemblyBuilder.Save(fileName);
}
public static void Main()
@@ -68,7 +66,7 @@ public static void Main()
// Set the culture information of the assembly to 'English-American'.
myAssemblyName.CultureInfo = new CultureInfo("en-US");
// Set the hash algorithm to 'SHA256'.
- myAssemblyName.HashAlgorithm = AssemblyHashAlgorithm.SHA256;
+ myAssemblyName.HashAlgorithm = System.Configuration.Assemblies.AssemblyHashAlgorithm.SHA256;
myAssemblyName.Name = "MyAssembly";
myAssemblyName.Version = new Version("1.0.0.2001");
MakeAssembly(myAssemblyName, "MyAssembly.exe");
diff --git a/snippets/csharp/System.Reflection/AssemblyName/SetPublicKey/assemblyname_setpublickey.cs b/snippets/csharp/System.Reflection/AssemblyName/SetPublicKey/assemblyname_setpublickey.cs
index 5dc45c57d62..48cde497b2f 100644
--- a/snippets/csharp/System.Reflection/AssemblyName/SetPublicKey/assemblyname_setpublickey.cs
+++ b/snippets/csharp/System.Reflection/AssemblyName/SetPublicKey/assemblyname_setpublickey.cs
@@ -36,9 +36,9 @@ public class AssemblyName_CodeBase
public static void MakeAssembly(AssemblyName myAssemblyName, string fileName)
{
// Get the assembly builder from the application domain associated with the current thread.
- AssemblyBuilder myAssemblyBuilder = Thread.GetDomain().DefineDynamicAssembly(myAssemblyName, AssemblyBuilderAccess.RunAndSave);
+ AssemblyBuilder myAssemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(myAssemblyName, AssemblyBuilderAccess.Run);
// Create a dynamic module in the assembly.
- ModuleBuilder myModuleBuilder = myAssemblyBuilder.DefineDynamicModule("MyModule", fileName);
+ ModuleBuilder myModuleBuilder = myAssemblyBuilder.DefineDynamicModule("MyModule");
// Create a type in the module.
TypeBuilder myTypeBuilder = myModuleBuilder.DefineType("MyType");
// Create a method called 'Main'.
@@ -53,8 +53,6 @@ public static void MakeAssembly(AssemblyName myAssemblyName, string fileName)
// End the creation of the type.
myTypeBuilder.CreateType();
// Set the method with name 'Main' as the entry point in the assembly.
- myAssemblyBuilder.SetEntryPoint(myMethodBuilder);
- myAssemblyBuilder.Save(fileName);
}
public static void Main()
@@ -66,7 +64,7 @@ public static void Main()
// Set the culture information of the assembly to 'English-American'.
myAssemblyName.CultureInfo = new CultureInfo("en-US");
// Set the hash algorithm to 'SHA256'.
- myAssemblyName.HashAlgorithm = AssemblyHashAlgorithm.SHA256;
+ myAssemblyName.HashAlgorithm = System.Configuration.Assemblies.AssemblyHashAlgorithm.SHA256;
myAssemblyName.VersionCompatibility = AssemblyVersionCompatibility.SameProcess;
myAssemblyName.Flags = AssemblyNameFlags.PublicKey;
// Get the whole contents of the 'PublicKey.snk' into a byte array.
diff --git a/snippets/csharp/System.Reflection/EventAttributes/Overview/typebuilder_getevents1.cs b/snippets/csharp/System.Reflection/EventAttributes/Overview/typebuilder_getevents1.cs
index ff459e04cee..30738bf8d01 100644
--- a/snippets/csharp/System.Reflection/EventAttributes/Overview/typebuilder_getevents1.cs
+++ b/snippets/csharp/System.Reflection/EventAttributes/Overview/typebuilder_getevents1.cs
@@ -33,7 +33,7 @@ private static TypeBuilder CreateCallee(AppDomain myDomain)
// Create the callee dynamic assembly.
AssemblyBuilder myAssembly =
- myDomain.DefineDynamicAssembly(assemblyName, AssemblyBuilderAccess.Run);
+ AssemblyBuilder.DefineDynamicAssembly(assemblyName, AssemblyBuilderAccess.Run);
// Create a dynamic module named "CalleeModule" in the callee.
ModuleBuilder myModule = myAssembly.DefineDynamicModule("EmittedModule");
diff --git a/snippets/csharp/System.Reflection/MethodBase/GetMethodImplementationFlags/constructorbuilder_getmodule_4.cs b/snippets/csharp/System.Reflection/MethodBase/GetMethodImplementationFlags/constructorbuilder_getmodule_4.cs
index b364c09cc2c..61dbedf4fe6 100644
--- a/snippets/csharp/System.Reflection/MethodBase/GetMethodImplementationFlags/constructorbuilder_getmodule_4.cs
+++ b/snippets/csharp/System.Reflection/MethodBase/GetMethodImplementationFlags/constructorbuilder_getmodule_4.cs
@@ -35,7 +35,7 @@ internal MyConstructorBuilder()
AssemblyName myAssemblyName = new AssemblyName();
myAssemblyName.Name = "TempAssembly";
// Create a dynamic assembly.
- myAssemblyBuilder = myCurrentDomain.DefineDynamicAssembly
+ myAssemblyBuilder = AssemblyBuilder.DefineDynamicAssembly
(myAssemblyName, AssemblyBuilderAccess.Run);
// Create a dynamic module in the assembly.
myModuleBuilder = myAssemblyBuilder.DefineDynamicModule("TempModule");
@@ -49,12 +49,6 @@ internal MyConstructorBuilder()
// Define a constructor of the dynamic class.
ConstructorBuilder myConstructorBuilder = myTypeBuilder.DefineConstructor(
MethodAttributes.Public, CallingConventions.Standard, myConstructorArgs);
- // Get a reference to the module that contains this constructor.
- Module myModule = myConstructorBuilder.GetModule();
- Console.WriteLine("Module Name : " + myModule.Name);
- // Get the 'MethodToken' that represents the token for this constructor.
- MethodToken myMethodToken = myConstructorBuilder.GetToken();
- Console.WriteLine("Constructor Token is : " + myMethodToken.Token);
// Get the method implementation flags for this constructor.
MethodImplAttributes myMethodImplAttributes = myConstructorBuilder.GetMethodImplementationFlags();
Console.WriteLine("MethodImplAttributes : " + myMethodImplAttributes);
diff --git a/snippets/csharp/System.Reflection/ParameterInfo/IsIn/parameterinfo_isin_isout_isoptional.cs b/snippets/csharp/System.Reflection/ParameterInfo/IsIn/parameterinfo_isin_isout_isoptional.cs
index 5a56b9624ae..37ebeea835e 100644
--- a/snippets/csharp/System.Reflection/ParameterInfo/IsIn/parameterinfo_isin_isout_isoptional.cs
+++ b/snippets/csharp/System.Reflection/ParameterInfo/IsIn/parameterinfo_isin_isout_isoptional.cs
@@ -26,9 +26,9 @@ public static void DefineMethod()
AssemblyName myAssemblyName = new AssemblyName();
myAssemblyName.Name = "MyAssembly";
// Get the assembly builder from the application domain associated with the current thread.
- AssemblyBuilder myAssemblyBuilder = Thread.GetDomain().DefineDynamicAssembly(myAssemblyName, AssemblyBuilderAccess.RunAndSave);
+ AssemblyBuilder myAssemblyBuilder = AssemblyBuilder.DefineDynamicAssembly(myAssemblyName, AssemblyBuilderAccess.Run);
// Create a dynamic module in the assembly.
- ModuleBuilder myModuleBuilder = myAssemblyBuilder.DefineDynamicModule("MyModule", "MyAssembly.dll");
+ ModuleBuilder myModuleBuilder = myAssemblyBuilder.DefineDynamicModule("MyModule");
// Create a type in the module.
TypeBuilder myTypeBuilder = myModuleBuilder.DefineType("MyType");
// Create a method called MyMethod.