From 83783770ef157a6a1e696099a1732d38bc312a83 Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Thu, 25 Jun 2026 14:15:34 -0700 Subject: [PATCH 1/6] Upgrade projects to .NET 10 --- .../csharp/System/ActionT1,T2,T3,T4/Overview/Project.csproj | 2 +- snippets/csharp/System/ActionT1,T2,T3/Overview/Project.csproj | 2 +- snippets/csharp/System/ActionT1,T2/Overview/Project.csproj | 2 +- .../csharp/System/ActivationContext/Overview/Project.csproj | 2 +- snippets/csharp/System/Activator/CreateInstanceT/Project.csproj | 2 +- snippets/csharp/System/Activator/Overview/Project.csproj | 2 +- .../csharp/System/AggregateException/Flatten/Project.csproj | 2 +- snippets/csharp/System/AggregateException/Handle/Project.csproj | 2 +- .../csharp/System/AggregateException/Overview/Project.csproj | 2 +- snippets/csharp/System/AppDomain/AssemblyLoad/Project.csproj | 2 +- snippets/csharp/System/AppDomain/AssemblyResolve/Project.csproj | 2 +- .../csharp/System/AppDomain/CreateInstanceFrom/Project.csproj | 2 +- snippets/csharp/System/AppDomain/ExecuteAssembly/Project.csproj | 2 +- .../csharp/System/AppDomain/FirstChanceException/Project.csproj | 2 +- snippets/csharp/System/AppDomain/GetData/Project.csproj | 2 +- .../System/AppDomain/ReflectionOnlyGetAssemblies/Project.csproj | 2 +- .../csharp/System/AppDomain/SetPrincipalPolicy/Project.csproj | 2 +- snippets/csharp/System/AppDomain/Snippets.csproj | 2 +- .../csharp/System/AppDomain/UnhandledException/Project.csproj | 2 +- snippets/csharp/System/ApplicationId/Overview/Project.csproj | 2 +- .../csharp/System/ArgumentException/Overview/Project.csproj | 2 +- .../System/ArgumentOutOfRangeException/Overview/cs.csproj | 2 +- snippets/csharp/System/Array/AsReadOnlyT/Project.csproj | 2 +- snippets/csharp/System/Array/BinarySearch/Project.csproj | 2 +- snippets/csharp/System/Array/Clear/Project.csproj | 2 +- snippets/csharp/System/Array/Clone/Project.csproj | 2 +- .../csharp/System/Array/ConvertAllTInput,TOutput/Project.csproj | 2 +- snippets/csharp/System/Array/Copy/Project.csproj | 2 +- snippets/csharp/System/Array/CopyTo/Project.csproj | 2 +- snippets/csharp/System/Array/CreateInstance/Project.csproj | 2 +- snippets/csharp/System/Array/FindAllT/Project.csproj | 2 +- snippets/csharp/System/Array/FindIndexT/Project.csproj | 2 +- snippets/csharp/System/Array/FindLastIndexT/Project.csproj | 2 +- snippets/csharp/System/Array/ForEachT/Project.csproj | 2 +- snippets/csharp/System/Array/GetEnumerator/Project.csproj | 2 +- snippets/csharp/System/Array/GetLength/Project.csproj | 2 +- snippets/csharp/System/Array/GetLowerBound/Project.csproj | 2 +- snippets/csharp/System/Array/GetValue/Project.csproj | 2 +- snippets/csharp/System/Array/IndexOf/Project.csproj | 2 +- snippets/csharp/System/Array/IndexOfT/Project.csproj | 2 +- snippets/csharp/System/Array/IsSynchronized/Project.csproj | 2 +- snippets/csharp/System/Array/LastIndexOf/Project.csproj | 2 +- snippets/csharp/System/Array/LastIndexOfT/Project.csproj | 2 +- snippets/csharp/System/Array/Length/Project.csproj | 2 +- snippets/csharp/System/Array/Overview/Project.csproj | 2 +- snippets/csharp/System/Array/Rank/Project.csproj | 2 +- snippets/csharp/System/Array/ResizeT/Project.csproj | 2 +- snippets/csharp/System/Array/Reverse/Project.csproj | 2 +- snippets/csharp/System/Array/Sort/Project.csproj | 2 +- snippets/csharp/System/Array/SortTKey,TValue/Project.csproj | 2 +- .../System/ArrayTypeMismatchException/.ctor/Project.csproj | 2 +- .../System/ArrayTypeMismatchException/Overview/Project.csproj | 2 +- snippets/csharp/System/Attribute/Equals/Project.csproj | 2 +- .../csharp/System/Attribute/GetCustomAttribute/Project.csproj | 2 +- snippets/csharp/System/Attribute/GetHashCode/Project.csproj | 2 +- .../csharp/System/Attribute/IsDefaultAttribute/Project.csproj | 2 +- snippets/csharp/System/Attribute/Match/Project.csproj | 2 +- snippets/csharp/System/Attribute/Overview/Project.csproj | 2 +- snippets/csharp/System/Attribute/TypeId/Project.csproj | 2 +- snippets/csharp/System/AttributeTargets/Overview/Project.csproj | 2 +- .../csharp/System/AttributeUsageAttribute/.ctor/Project.csproj | 2 +- .../System/AttributeUsageAttribute/Inherited/Project.csproj | 2 +- .../csharp/System/BitConverter/DoubleToInt64Bits/Project.csproj | 2 +- snippets/csharp/System/BitConverter/ToBoolean/Project.csproj | 2 +- snippets/csharp/System/BitConverter/ToInt16/Project.csproj | 2 +- snippets/csharp/System/BitConverter/ToInt32/Project.csproj | 2 +- snippets/csharp/System/BitConverter/ToUInt16/Project.csproj | 2 +- snippets/csharp/System/Boolean/CompareTo/Project.csproj | 2 +- snippets/csharp/System/Boolean/Parse/Project.csproj | 2 +- snippets/csharp/System/Boolean/TryParse/Project.csproj | 2 +- snippets/csharp/System/Buffer/ByteLength/Project.csproj | 2 +- snippets/csharp/System/Byte/CompareTo/Project.csproj | 2 +- snippets/csharp/System/Byte/Equals/Project.csproj | 2 +- snippets/csharp/System/Byte/Parse/Project.csproj | 2 +- snippets/csharp/System/Byte/ToString/Project.csproj | 2 +- snippets/csharp/System/Byte/TryParse/Project.csproj | 2 +- snippets/csharp/System/Char/CompareTo/Project.csproj | 2 +- snippets/csharp/System/Char/ConvertFromUtf32/Project.csproj | 2 +- snippets/csharp/System/Char/Equals/Project.csproj | 2 +- snippets/csharp/System/Char/GetNumericValue/Project.csproj | 2 +- snippets/csharp/System/Char/GetUnicodeCategory/Project.csproj | 2 +- snippets/csharp/System/Char/IsControl/Project.csproj | 2 +- snippets/csharp/System/Char/IsDigit/Project.csproj | 2 +- snippets/csharp/System/Char/IsHighSurrogate/Project.csproj | 2 +- snippets/csharp/System/Char/IsLetter/Project.csproj | 2 +- snippets/csharp/System/Char/IsLetterOrDigit/Project.csproj | 2 +- snippets/csharp/System/Char/IsLower/Project.csproj | 2 +- snippets/csharp/System/Char/IsNumber/Project.csproj | 2 +- snippets/csharp/System/Char/IsPunctuation/Project.csproj | 2 +- snippets/csharp/System/Char/IsSeparator/Project.csproj | 2 +- snippets/csharp/System/Char/IsSurrogate/Project.csproj | 2 +- snippets/csharp/System/Char/IsSymbol/Project.csproj | 2 +- snippets/csharp/System/Char/IsWhiteSpace/Project.csproj | 2 +- snippets/csharp/System/Char/Parse/Project.csproj | 2 +- snippets/csharp/System/Char/ToLower/Project.csproj | 2 +- snippets/csharp/System/Char/ToString/Project.csproj | 2 +- snippets/csharp/System/Char/TryParse/Project.csproj | 2 +- snippets/csharp/System/CharEnumerator/Overview/Project.csproj | 2 +- snippets/csharp/System/Console/BufferHeight/Project.csproj | 2 +- snippets/csharp/System/Console/CancelKeyPress/Project.csproj | 2 +- snippets/csharp/System/Console/Clear/Project.csproj | 2 +- snippets/csharp/System/Console/CursorSize/Project.csproj | 2 +- snippets/csharp/System/Console/CursorVisible/Project.csproj | 2 +- snippets/csharp/System/Console/Error/Project.csproj | 2 +- snippets/csharp/System/Console/In/Project.csproj | 2 +- snippets/csharp/System/Console/KeyAvailable/Project.csproj | 2 +- snippets/csharp/System/Console/OpenStandardInput/Project.csproj | 2 +- .../csharp/System/Console/OpenStandardOutput/Project.csproj | 2 +- snippets/csharp/System/Console/Out/Project.csproj | 2 +- snippets/csharp/System/Console/Read/Project.csproj | 2 +- snippets/csharp/System/Console/SetBufferSize/Project.csproj | 2 +- snippets/csharp/System/Console/SetError/Project.csproj | 2 +- snippets/csharp/System/Console/SetOut/Project.csproj | 2 +- snippets/csharp/System/Console/SetWindowSize/Project.csproj | 2 +- snippets/csharp/System/Console/Title/Project.csproj | 2 +- snippets/csharp/System/Console/WindowLeft/Project.csproj | 2 +- snippets/csharp/System/ConsoleKey/Overview/Project.csproj | 2 +- snippets/csharp/System/ConsoleKeyInfo/Equals/Project.csproj | 2 +- .../csharp/System/ConsoleKeyInfo/GetHashCode/Project.csproj | 2 +- snippets/csharp/System/ConsoleKeyInfo/KeyChar/Project.csproj | 2 +- snippets/csharp/System/Convert/DBNull/Project.csproj | 2 +- .../csharp/System/Convert/FromBase64CharArray/Project.csproj | 2 +- snippets/csharp/System/Convert/Overview/Project.csproj | 2 +- snippets/csharp/System/Convert/ToBase64String/Project.csproj | 2 +- snippets/csharp/System/Convert/ToBoolean/Project.csproj | 2 +- snippets/csharp/System/Convert/ToByte/Project.csproj | 2 +- snippets/csharp/System/Convert/ToChar/Project.csproj | 2 +- snippets/csharp/System/Convert/ToInt16/Project.csproj | 2 +- .../System/ConverterTInput,TOutput/Overview/Project.csproj | 2 +- snippets/csharp/System/DateTime/Add/Project.csproj | 2 +- snippets/csharp/System/DateTime/AddDays/Project.csproj | 2 +- snippets/csharp/System/DateTime/AddHours/Project.csproj | 2 +- snippets/csharp/System/DateTime/AddMilliseconds/Project.csproj | 2 +- snippets/csharp/System/DateTime/AddMinutes/Project.csproj | 2 +- snippets/csharp/System/DateTime/AddMonths/Project.csproj | 2 +- snippets/csharp/System/DateTime/AddSeconds/Project.csproj | 2 +- snippets/csharp/System/DateTime/AddYears/Project.csproj | 2 +- snippets/csharp/System/DateTime/Compare/Project.csproj | 2 +- snippets/csharp/System/DateTime/CompareTo/Project.csproj | 2 +- snippets/csharp/System/DateTime/Date/Project.csproj | 2 +- snippets/csharp/System/DateTime/DayOfWeek/Project.csproj | 2 +- snippets/csharp/System/DateTime/DayOfYear/Project.csproj | 2 +- snippets/csharp/System/DateTime/Equals/Project.csproj | 2 +- snippets/csharp/System/DateTime/FromBinary/Project.csproj | 2 +- snippets/csharp/System/DateTime/FromFileTime/Project.csproj | 2 +- .../csharp/System/DateTime/GetDateTimeFormats/Project.csproj | 2 +- snippets/csharp/System/DateTime/Hour/Project.csproj | 2 +- snippets/csharp/System/DateTime/IsLeapYear/Project.csproj | 2 +- snippets/csharp/System/DateTime/Kind/Project.csproj | 2 +- snippets/csharp/System/DateTime/MaxValue/Project.csproj | 2 +- snippets/csharp/System/DateTime/Millisecond/Project.csproj | 2 +- snippets/csharp/System/DateTime/Ticks/Project.csproj | 2 +- snippets/csharp/System/DateTime/TimeOfDay/Project.csproj | 2 +- snippets/csharp/System/DateTime/ToFileTime/Project.csproj | 2 +- snippets/csharp/System/DateTime/ToLongDateString/Project.csproj | 2 +- snippets/csharp/System/DateTime/ToLongTimeString/Project.csproj | 2 +- .../csharp/System/DateTime/ToShortDateString/Project.csproj | 2 +- snippets/csharp/System/DateTime/ToString/tostring.csproj | 2 +- snippets/csharp/System/DateTime/Today/Project.csproj | 2 +- snippets/csharp/System/DateTime/Year/Project.csproj | 2 +- snippets/csharp/System/DateTime/op_Addition/Project.csproj | 2 +- snippets/csharp/System/DateTime/op_Subtraction/Project.csproj | 2 +- snippets/csharp/System/DateTimeOffset/.ctor/Project.csproj | 2 +- snippets/csharp/System/DateTimeOffset/Compare/Project.csproj | 2 +- snippets/csharp/System/DateTimeOffset/Date/Project.csproj | 2 +- .../csharp/System/DateTimeOffset/FromFileTime/Project.csproj | 2 +- snippets/csharp/System/DateTimeOffset/Now/Project.csproj | 2 +- snippets/csharp/System/DateTimeOffset/Overview/Project.csproj | 2 +- snippets/csharp/System/DateTimeOffset/Parse/Project.csproj | 2 +- snippets/csharp/System/DateTimeOffset/ParseExact/Project.csproj | 2 +- snippets/csharp/System/DateTimeOffset/ToOffset/Project.csproj | 2 +- .../System/DateTimeOffset/ToUnixTimeSeconds/Project.csproj | 2 +- snippets/csharp/System/DateTimeOffset/TryParse/Project.csproj | 2 +- .../csharp/System/DateTimeOffset/TryParseExact/Project.csproj | 2 +- .../csharp/System/DateTimeOffset/op_Addition/Project.csproj | 2 +- snippets/csharp/System/Decimal/Ceiling/Project.csproj | 2 +- snippets/csharp/System/Decimal/Compare/Project.csproj | 2 +- snippets/csharp/System/Decimal/CompareTo/Project.csproj | 2 +- snippets/csharp/System/Decimal/Divide/Project.csproj | 2 +- snippets/csharp/System/Decimal/Equals/Project.csproj | 2 +- snippets/csharp/System/Decimal/FromOACurrency/Project.csproj | 2 +- snippets/csharp/System/Decimal/GetBits/Project.csproj | 2 +- snippets/csharp/System/Decimal/MinusOne/Project.csproj | 2 +- snippets/csharp/System/Decimal/Multiply/Project.csproj | 2 +- snippets/csharp/System/Decimal/Negate/Project.csproj | 2 +- snippets/csharp/System/Decimal/Overview/Project.csproj | 2 +- snippets/csharp/System/Decimal/Remainder/Project.csproj | 2 +- snippets/csharp/System/Decimal/Round/Rounding.csproj | 2 +- snippets/csharp/System/Decimal/ToByte/Project.csproj | 2 +- snippets/csharp/System/Decimal/ToDouble/Project.csproj | 2 +- snippets/csharp/System/Decimal/ToInt16/Project.csproj | 2 +- snippets/csharp/System/Decimal/ToInt32/Project.csproj | 2 +- snippets/csharp/System/Decimal/ToInt64/Project.csproj | 2 +- snippets/csharp/System/Decimal/ToSByte/Project.csproj | 2 +- snippets/csharp/System/Decimal/ToString/Project.csproj | 2 +- snippets/csharp/System/Decimal/ToUInt16/Project.csproj | 2 +- snippets/csharp/System/Decimal/ToUInt32/Project.csproj | 2 +- snippets/csharp/System/Decimal/ToUInt64/Project.csproj | 2 +- snippets/csharp/System/Decimal/TryParse/Project.csproj | 2 +- snippets/csharp/System/Double/MaxValue/Project.csproj | 2 +- snippets/csharp/System/Double/MinValue/Project.csproj | 2 +- snippets/csharp/System/Double/Overview/Project.csproj | 2 +- snippets/csharp/System/Double/Parse/Project.csproj | 2 +- snippets/csharp/System/Enum/CompareTo/Project.csproj | 2 +- snippets/csharp/System/Enum/Equals/Project.csproj | 2 +- snippets/csharp/System/Enum/Format/Project.csproj | 2 +- snippets/csharp/System/Enum/GetName/Project.csproj | 2 +- snippets/csharp/System/Enum/GetNames/Project.csproj | 2 +- snippets/csharp/System/Enum/GetUnderlyingType/Project.csproj | 2 +- snippets/csharp/System/Enum/ToString/Project.csproj | 2 +- .../System/Environment+SpecialFolder/Overview/Project.csproj | 2 +- snippets/csharp/System/Environment/CommandLine/Project.csproj | 2 +- .../csharp/System/Environment/CurrentDirectory/Project.csproj | 2 +- .../Environment/ExpandEnvironmentVariables/Project.csproj | 2 +- snippets/csharp/System/Environment/FailFast/Project.csproj | 2 +- .../csharp/System/Environment/GetCommandLineArgs/Project.csproj | 2 +- .../System/Environment/GetEnvironmentVariables/Project.csproj | 2 +- .../csharp/System/Environment/GetLogicalDrives/Project.csproj | 2 +- snippets/csharp/System/Environment/MachineName/Project.csproj | 2 +- snippets/csharp/System/Environment/NewLine/Project.csproj | 2 +- snippets/csharp/System/Environment/Overview/Project.csproj | 2 +- .../csharp/System/Environment/ProcessorCount/Project.csproj | 2 +- snippets/csharp/System/Environment/StackTrace/Project.csproj | 2 +- .../csharp/System/Environment/SystemDirectory/Project.csproj | 2 +- .../csharp/System/Environment/UserInteractive/Project.csproj | 2 +- snippets/csharp/System/Environment/UserName/Project.csproj | 2 +- snippets/csharp/System/Environment/Version/Project.csproj | 2 +- snippets/csharp/System/Environment/WorkingSet/Project.csproj | 2 +- snippets/csharp/System/EventArgs/Overview/Project.csproj | 2 +- snippets/csharp/System/Exception/.ctor/Project.csproj | 2 +- snippets/csharp/System/Exception/Data/Project.csproj | 2 +- .../csharp/System/Exception/GetBaseException/Project.csproj | 2 +- snippets/csharp/System/Exception/HResult/Project.csproj | 2 +- snippets/csharp/System/Exception/HelpLink/Project.csproj | 2 +- snippets/csharp/System/Exception/InnerException/Project.csproj | 2 +- snippets/csharp/System/Exception/ToString/Project.csproj | 2 +- snippets/csharp/System/FuncT,TResult/Overview/Project.csproj | 2 +- .../csharp/System/FuncT1,T2,T3,TResult/Overview/Project.csproj | 2 +- .../csharp/System/FuncT1,T2,TResult/Overview/Project.csproj | 2 +- .../csharp/System/GC/CancelFullGCNotification/Project.csproj | 2 +- snippets/csharp/System/GC/GetGeneration/Project.csproj | 2 +- snippets/csharp/System/GC/KeepAlive/Project.csproj | 2 +- snippets/csharp/System/GC/Overview/Project.csproj | 2 +- snippets/csharp/System/GC/ReRegisterForFinalize/Project.csproj | 2 +- .../GC/SuppressFinalize/system.gc.suppressfinalize.csproj | 2 +- .../csharp/System/GC/WaitForPendingFinalizers/Project.csproj | 2 +- snippets/csharp/System/Guid/Empty/Project.csproj | 2 +- snippets/csharp/System/Guid/NewGuid/Project.csproj | 2 +- snippets/csharp/System/Guid/ToByteArray/Project.csproj | 2 +- snippets/csharp/System/IComparable/Overview/Project.csproj | 2 +- snippets/csharp/System/IComparableT/Overview/Project.csproj | 2 +- snippets/csharp/System/IConvertible/Overview/Project.csproj | 2 +- snippets/csharp/System/ICustomFormatter/Overview/Project.csproj | 2 +- snippets/csharp/System/IDisposable/Overview/Dispose.csproj | 2 +- snippets/csharp/System/IEquatableT/Equals/Equals.csproj | 2 +- snippets/csharp/System/IFormatProvider/Overview/Project.csproj | 2 +- snippets/csharp/System/IFormattable/Overview/Project.csproj | 2 +- snippets/csharp/System/Int16/Equals/Project.csproj | 2 +- snippets/csharp/System/Int16/MaxValue/Project.csproj | 2 +- snippets/csharp/System/Int16/Parse/Project.csproj | 2 +- snippets/csharp/System/Int16/ToString/Project.csproj | 2 +- snippets/csharp/System/Int32/CompareTo/Project.csproj | 2 +- snippets/csharp/System/Int32/Equals/Project.csproj | 2 +- snippets/csharp/System/Int32/MaxValue/Project.csproj | 2 +- snippets/csharp/System/Int32/ToString/Project.csproj | 2 +- snippets/csharp/System/Int32/TryParse/Project.csproj | 2 +- snippets/csharp/System/Int64/Equals/Project.csproj | 2 +- snippets/csharp/System/Int64/ToString/Project.csproj | 2 +- .../Overview/WPF1/WPFCrossThreadCS.csproj | 2 +- .../Overview/WPF2/WPFCrossThreadDispatcherCS.csproj | 2 +- .../Overview/WinForms/WFCrossThreadCS.csproj | 2 +- 271 files changed, 271 insertions(+), 271 deletions(-) diff --git a/snippets/csharp/System/ActionT1,T2,T3,T4/Overview/Project.csproj b/snippets/csharp/System/ActionT1,T2,T3,T4/Overview/Project.csproj index 0acafa4bd50..fdb70958de5 100644 --- a/snippets/csharp/System/ActionT1,T2,T3,T4/Overview/Project.csproj +++ b/snippets/csharp/System/ActionT1,T2,T3,T4/Overview/Project.csproj @@ -2,7 +2,7 @@ Exe - net8.0 + net10.0 diff --git a/snippets/csharp/System/ActionT1,T2,T3/Overview/Project.csproj b/snippets/csharp/System/ActionT1,T2,T3/Overview/Project.csproj index 0acafa4bd50..fdb70958de5 100644 --- a/snippets/csharp/System/ActionT1,T2,T3/Overview/Project.csproj +++ b/snippets/csharp/System/ActionT1,T2,T3/Overview/Project.csproj @@ -2,7 +2,7 @@ Exe - net8.0 + net10.0 diff --git a/snippets/csharp/System/ActionT1,T2/Overview/Project.csproj b/snippets/csharp/System/ActionT1,T2/Overview/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/ActionT1,T2/Overview/Project.csproj +++ b/snippets/csharp/System/ActionT1,T2/Overview/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/ActivationContext/Overview/Project.csproj b/snippets/csharp/System/ActivationContext/Overview/Project.csproj index d2486ce2f06..1eddf5e00ac 100644 --- a/snippets/csharp/System/ActivationContext/Overview/Project.csproj +++ b/snippets/csharp/System/ActivationContext/Overview/Project.csproj @@ -1,6 +1,6 @@ Library - net4.8 + net10.0 diff --git a/snippets/csharp/System/Activator/CreateInstanceT/Project.csproj b/snippets/csharp/System/Activator/CreateInstanceT/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Activator/CreateInstanceT/Project.csproj +++ b/snippets/csharp/System/Activator/CreateInstanceT/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Activator/Overview/Project.csproj b/snippets/csharp/System/Activator/Overview/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/Activator/Overview/Project.csproj +++ b/snippets/csharp/System/Activator/Overview/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/AggregateException/Flatten/Project.csproj b/snippets/csharp/System/AggregateException/Flatten/Project.csproj index b906551488a..974f3738a76 100644 --- a/snippets/csharp/System/AggregateException/Flatten/Project.csproj +++ b/snippets/csharp/System/AggregateException/Flatten/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 Example diff --git a/snippets/csharp/System/AggregateException/Handle/Project.csproj b/snippets/csharp/System/AggregateException/Handle/Project.csproj index b906551488a..974f3738a76 100644 --- a/snippets/csharp/System/AggregateException/Handle/Project.csproj +++ b/snippets/csharp/System/AggregateException/Handle/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 Example diff --git a/snippets/csharp/System/AggregateException/Overview/Project.csproj b/snippets/csharp/System/AggregateException/Overview/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/AggregateException/Overview/Project.csproj +++ b/snippets/csharp/System/AggregateException/Overview/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/AppDomain/AssemblyLoad/Project.csproj b/snippets/csharp/System/AppDomain/AssemblyLoad/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/AppDomain/AssemblyLoad/Project.csproj +++ b/snippets/csharp/System/AppDomain/AssemblyLoad/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/AppDomain/AssemblyResolve/Project.csproj b/snippets/csharp/System/AppDomain/AssemblyResolve/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/AppDomain/AssemblyResolve/Project.csproj +++ b/snippets/csharp/System/AppDomain/AssemblyResolve/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/AppDomain/CreateInstanceFrom/Project.csproj b/snippets/csharp/System/AppDomain/CreateInstanceFrom/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/AppDomain/CreateInstanceFrom/Project.csproj +++ b/snippets/csharp/System/AppDomain/CreateInstanceFrom/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/AppDomain/ExecuteAssembly/Project.csproj b/snippets/csharp/System/AppDomain/ExecuteAssembly/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/AppDomain/ExecuteAssembly/Project.csproj +++ b/snippets/csharp/System/AppDomain/ExecuteAssembly/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/AppDomain/FirstChanceException/Project.csproj b/snippets/csharp/System/AppDomain/FirstChanceException/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/AppDomain/FirstChanceException/Project.csproj +++ b/snippets/csharp/System/AppDomain/FirstChanceException/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/AppDomain/GetData/Project.csproj b/snippets/csharp/System/AppDomain/GetData/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/AppDomain/GetData/Project.csproj +++ b/snippets/csharp/System/AppDomain/GetData/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/AppDomain/ReflectionOnlyGetAssemblies/Project.csproj b/snippets/csharp/System/AppDomain/ReflectionOnlyGetAssemblies/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/AppDomain/ReflectionOnlyGetAssemblies/Project.csproj +++ b/snippets/csharp/System/AppDomain/ReflectionOnlyGetAssemblies/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/AppDomain/SetPrincipalPolicy/Project.csproj b/snippets/csharp/System/AppDomain/SetPrincipalPolicy/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/AppDomain/SetPrincipalPolicy/Project.csproj +++ b/snippets/csharp/System/AppDomain/SetPrincipalPolicy/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/AppDomain/Snippets.csproj b/snippets/csharp/System/AppDomain/Snippets.csproj index 25dec40d7aa..10f1ac4e07e 100644 --- a/snippets/csharp/System/AppDomain/Snippets.csproj +++ b/snippets/csharp/System/AppDomain/Snippets.csproj @@ -1,5 +1,5 @@ - net4.8 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/AppDomain/UnhandledException/Project.csproj b/snippets/csharp/System/AppDomain/UnhandledException/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/AppDomain/UnhandledException/Project.csproj +++ b/snippets/csharp/System/AppDomain/UnhandledException/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/ApplicationId/Overview/Project.csproj b/snippets/csharp/System/ApplicationId/Overview/Project.csproj index d2486ce2f06..1eddf5e00ac 100644 --- a/snippets/csharp/System/ApplicationId/Overview/Project.csproj +++ b/snippets/csharp/System/ApplicationId/Overview/Project.csproj @@ -1,6 +1,6 @@ Library - net4.8 + net10.0 diff --git a/snippets/csharp/System/ArgumentException/Overview/Project.csproj b/snippets/csharp/System/ArgumentException/Overview/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/ArgumentException/Overview/Project.csproj +++ b/snippets/csharp/System/ArgumentException/Overview/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/ArgumentOutOfRangeException/Overview/cs.csproj b/snippets/csharp/System/ArgumentOutOfRangeException/Overview/cs.csproj index 21981895620..fe34df0f6ca 100644 --- a/snippets/csharp/System/ArgumentOutOfRangeException/Overview/cs.csproj +++ b/snippets/csharp/System/ArgumentOutOfRangeException/Overview/cs.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 enable Program diff --git a/snippets/csharp/System/Array/AsReadOnlyT/Project.csproj b/snippets/csharp/System/Array/AsReadOnlyT/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Array/AsReadOnlyT/Project.csproj +++ b/snippets/csharp/System/Array/AsReadOnlyT/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Array/BinarySearch/Project.csproj b/snippets/csharp/System/Array/BinarySearch/Project.csproj index 41f1d5ad4b2..a15a29bf12c 100644 --- a/snippets/csharp/System/Array/BinarySearch/Project.csproj +++ b/snippets/csharp/System/Array/BinarySearch/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 diff --git a/snippets/csharp/System/Array/Clear/Project.csproj b/snippets/csharp/System/Array/Clear/Project.csproj index a269962b552..a15a29bf12c 100644 --- a/snippets/csharp/System/Array/Clear/Project.csproj +++ b/snippets/csharp/System/Array/Clear/Project.csproj @@ -2,7 +2,7 @@ Exe - net8.0 + net10.0 diff --git a/snippets/csharp/System/Array/Clone/Project.csproj b/snippets/csharp/System/Array/Clone/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Array/Clone/Project.csproj +++ b/snippets/csharp/System/Array/Clone/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Array/ConvertAllTInput,TOutput/Project.csproj b/snippets/csharp/System/Array/ConvertAllTInput,TOutput/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Array/ConvertAllTInput,TOutput/Project.csproj +++ b/snippets/csharp/System/Array/ConvertAllTInput,TOutput/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Array/Copy/Project.csproj b/snippets/csharp/System/Array/Copy/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Array/Copy/Project.csproj +++ b/snippets/csharp/System/Array/Copy/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Array/CopyTo/Project.csproj b/snippets/csharp/System/Array/CopyTo/Project.csproj index 4e410ba10d9..bddcf7bee1a 100644 --- a/snippets/csharp/System/Array/CopyTo/Project.csproj +++ b/snippets/csharp/System/Array/CopyTo/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 SamplesArray diff --git a/snippets/csharp/System/Array/CreateInstance/Project.csproj b/snippets/csharp/System/Array/CreateInstance/Project.csproj index 8cea17f0eb4..6a1edc3ba55 100644 --- a/snippets/csharp/System/Array/CreateInstance/Project.csproj +++ b/snippets/csharp/System/Array/CreateInstance/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 SamplesArray diff --git a/snippets/csharp/System/Array/FindAllT/Project.csproj b/snippets/csharp/System/Array/FindAllT/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/Array/FindAllT/Project.csproj +++ b/snippets/csharp/System/Array/FindAllT/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/Array/FindIndexT/Project.csproj b/snippets/csharp/System/Array/FindIndexT/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Array/FindIndexT/Project.csproj +++ b/snippets/csharp/System/Array/FindIndexT/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Array/FindLastIndexT/Project.csproj b/snippets/csharp/System/Array/FindLastIndexT/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Array/FindLastIndexT/Project.csproj +++ b/snippets/csharp/System/Array/FindLastIndexT/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Array/ForEachT/Project.csproj b/snippets/csharp/System/Array/ForEachT/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Array/ForEachT/Project.csproj +++ b/snippets/csharp/System/Array/ForEachT/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Array/GetEnumerator/Project.csproj b/snippets/csharp/System/Array/GetEnumerator/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Array/GetEnumerator/Project.csproj +++ b/snippets/csharp/System/Array/GetEnumerator/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Array/GetLength/Project.csproj b/snippets/csharp/System/Array/GetLength/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Array/GetLength/Project.csproj +++ b/snippets/csharp/System/Array/GetLength/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Array/GetLowerBound/Project.csproj b/snippets/csharp/System/Array/GetLowerBound/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Array/GetLowerBound/Project.csproj +++ b/snippets/csharp/System/Array/GetLowerBound/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Array/GetValue/Project.csproj b/snippets/csharp/System/Array/GetValue/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Array/GetValue/Project.csproj +++ b/snippets/csharp/System/Array/GetValue/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Array/IndexOf/Project.csproj b/snippets/csharp/System/Array/IndexOf/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Array/IndexOf/Project.csproj +++ b/snippets/csharp/System/Array/IndexOf/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Array/IndexOfT/Project.csproj b/snippets/csharp/System/Array/IndexOfT/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Array/IndexOfT/Project.csproj +++ b/snippets/csharp/System/Array/IndexOfT/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Array/IsSynchronized/Project.csproj b/snippets/csharp/System/Array/IsSynchronized/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Array/IsSynchronized/Project.csproj +++ b/snippets/csharp/System/Array/IsSynchronized/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Array/LastIndexOf/Project.csproj b/snippets/csharp/System/Array/LastIndexOf/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Array/LastIndexOf/Project.csproj +++ b/snippets/csharp/System/Array/LastIndexOf/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Array/LastIndexOfT/Project.csproj b/snippets/csharp/System/Array/LastIndexOfT/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Array/LastIndexOfT/Project.csproj +++ b/snippets/csharp/System/Array/LastIndexOfT/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Array/Length/Project.csproj b/snippets/csharp/System/Array/Length/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Array/Length/Project.csproj +++ b/snippets/csharp/System/Array/Length/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Array/Overview/Project.csproj b/snippets/csharp/System/Array/Overview/Project.csproj index cab50a4a27f..d92bfcd3e1c 100644 --- a/snippets/csharp/System/Array/Overview/Project.csproj +++ b/snippets/csharp/System/Array/Overview/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 SamplesArray diff --git a/snippets/csharp/System/Array/Rank/Project.csproj b/snippets/csharp/System/Array/Rank/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Array/Rank/Project.csproj +++ b/snippets/csharp/System/Array/Rank/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Array/ResizeT/Project.csproj b/snippets/csharp/System/Array/ResizeT/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/Array/ResizeT/Project.csproj +++ b/snippets/csharp/System/Array/ResizeT/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/Array/Reverse/Project.csproj b/snippets/csharp/System/Array/Reverse/Project.csproj index 8cea17f0eb4..6a1edc3ba55 100644 --- a/snippets/csharp/System/Array/Reverse/Project.csproj +++ b/snippets/csharp/System/Array/Reverse/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 SamplesArray diff --git a/snippets/csharp/System/Array/Sort/Project.csproj b/snippets/csharp/System/Array/Sort/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/Array/Sort/Project.csproj +++ b/snippets/csharp/System/Array/Sort/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/Array/SortTKey,TValue/Project.csproj b/snippets/csharp/System/Array/SortTKey,TValue/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Array/SortTKey,TValue/Project.csproj +++ b/snippets/csharp/System/Array/SortTKey,TValue/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/ArrayTypeMismatchException/.ctor/Project.csproj b/snippets/csharp/System/ArrayTypeMismatchException/.ctor/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/ArrayTypeMismatchException/.ctor/Project.csproj +++ b/snippets/csharp/System/ArrayTypeMismatchException/.ctor/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/ArrayTypeMismatchException/Overview/Project.csproj b/snippets/csharp/System/ArrayTypeMismatchException/Overview/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/ArrayTypeMismatchException/Overview/Project.csproj +++ b/snippets/csharp/System/ArrayTypeMismatchException/Overview/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Attribute/Equals/Project.csproj b/snippets/csharp/System/Attribute/Equals/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Attribute/Equals/Project.csproj +++ b/snippets/csharp/System/Attribute/Equals/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Attribute/GetCustomAttribute/Project.csproj b/snippets/csharp/System/Attribute/GetCustomAttribute/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/Attribute/GetCustomAttribute/Project.csproj +++ b/snippets/csharp/System/Attribute/GetCustomAttribute/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/Attribute/GetHashCode/Project.csproj b/snippets/csharp/System/Attribute/GetHashCode/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Attribute/GetHashCode/Project.csproj +++ b/snippets/csharp/System/Attribute/GetHashCode/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Attribute/IsDefaultAttribute/Project.csproj b/snippets/csharp/System/Attribute/IsDefaultAttribute/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Attribute/IsDefaultAttribute/Project.csproj +++ b/snippets/csharp/System/Attribute/IsDefaultAttribute/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Attribute/Match/Project.csproj b/snippets/csharp/System/Attribute/Match/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Attribute/Match/Project.csproj +++ b/snippets/csharp/System/Attribute/Match/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Attribute/Overview/Project.csproj b/snippets/csharp/System/Attribute/Overview/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Attribute/Overview/Project.csproj +++ b/snippets/csharp/System/Attribute/Overview/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Attribute/TypeId/Project.csproj b/snippets/csharp/System/Attribute/TypeId/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Attribute/TypeId/Project.csproj +++ b/snippets/csharp/System/Attribute/TypeId/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/AttributeTargets/Overview/Project.csproj b/snippets/csharp/System/AttributeTargets/Overview/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/AttributeTargets/Overview/Project.csproj +++ b/snippets/csharp/System/AttributeTargets/Overview/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/AttributeUsageAttribute/.ctor/Project.csproj b/snippets/csharp/System/AttributeUsageAttribute/.ctor/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/AttributeUsageAttribute/.ctor/Project.csproj +++ b/snippets/csharp/System/AttributeUsageAttribute/.ctor/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/AttributeUsageAttribute/Inherited/Project.csproj b/snippets/csharp/System/AttributeUsageAttribute/Inherited/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/AttributeUsageAttribute/Inherited/Project.csproj +++ b/snippets/csharp/System/AttributeUsageAttribute/Inherited/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/BitConverter/DoubleToInt64Bits/Project.csproj b/snippets/csharp/System/BitConverter/DoubleToInt64Bits/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/BitConverter/DoubleToInt64Bits/Project.csproj +++ b/snippets/csharp/System/BitConverter/DoubleToInt64Bits/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/BitConverter/ToBoolean/Project.csproj b/snippets/csharp/System/BitConverter/ToBoolean/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/BitConverter/ToBoolean/Project.csproj +++ b/snippets/csharp/System/BitConverter/ToBoolean/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/BitConverter/ToInt16/Project.csproj b/snippets/csharp/System/BitConverter/ToInt16/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/BitConverter/ToInt16/Project.csproj +++ b/snippets/csharp/System/BitConverter/ToInt16/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/BitConverter/ToInt32/Project.csproj b/snippets/csharp/System/BitConverter/ToInt32/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/BitConverter/ToInt32/Project.csproj +++ b/snippets/csharp/System/BitConverter/ToInt32/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/BitConverter/ToUInt16/Project.csproj b/snippets/csharp/System/BitConverter/ToUInt16/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/BitConverter/ToUInt16/Project.csproj +++ b/snippets/csharp/System/BitConverter/ToUInt16/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/Boolean/CompareTo/Project.csproj b/snippets/csharp/System/Boolean/CompareTo/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Boolean/CompareTo/Project.csproj +++ b/snippets/csharp/System/Boolean/CompareTo/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Boolean/Parse/Project.csproj b/snippets/csharp/System/Boolean/Parse/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Boolean/Parse/Project.csproj +++ b/snippets/csharp/System/Boolean/Parse/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Boolean/TryParse/Project.csproj b/snippets/csharp/System/Boolean/TryParse/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Boolean/TryParse/Project.csproj +++ b/snippets/csharp/System/Boolean/TryParse/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Buffer/ByteLength/Project.csproj b/snippets/csharp/System/Buffer/ByteLength/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/Buffer/ByteLength/Project.csproj +++ b/snippets/csharp/System/Buffer/ByteLength/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/Byte/CompareTo/Project.csproj b/snippets/csharp/System/Byte/CompareTo/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Byte/CompareTo/Project.csproj +++ b/snippets/csharp/System/Byte/CompareTo/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Byte/Equals/Project.csproj b/snippets/csharp/System/Byte/Equals/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Byte/Equals/Project.csproj +++ b/snippets/csharp/System/Byte/Equals/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Byte/Parse/Project.csproj b/snippets/csharp/System/Byte/Parse/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Byte/Parse/Project.csproj +++ b/snippets/csharp/System/Byte/Parse/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Byte/ToString/Project.csproj b/snippets/csharp/System/Byte/ToString/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/Byte/ToString/Project.csproj +++ b/snippets/csharp/System/Byte/ToString/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/Byte/TryParse/Project.csproj b/snippets/csharp/System/Byte/TryParse/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/Byte/TryParse/Project.csproj +++ b/snippets/csharp/System/Byte/TryParse/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/Char/CompareTo/Project.csproj b/snippets/csharp/System/Char/CompareTo/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Char/CompareTo/Project.csproj +++ b/snippets/csharp/System/Char/CompareTo/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Char/ConvertFromUtf32/Project.csproj b/snippets/csharp/System/Char/ConvertFromUtf32/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Char/ConvertFromUtf32/Project.csproj +++ b/snippets/csharp/System/Char/ConvertFromUtf32/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Char/Equals/Project.csproj b/snippets/csharp/System/Char/Equals/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Char/Equals/Project.csproj +++ b/snippets/csharp/System/Char/Equals/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Char/GetNumericValue/Project.csproj b/snippets/csharp/System/Char/GetNumericValue/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/Char/GetNumericValue/Project.csproj +++ b/snippets/csharp/System/Char/GetNumericValue/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/Char/GetUnicodeCategory/Project.csproj b/snippets/csharp/System/Char/GetUnicodeCategory/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Char/GetUnicodeCategory/Project.csproj +++ b/snippets/csharp/System/Char/GetUnicodeCategory/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Char/IsControl/Project.csproj b/snippets/csharp/System/Char/IsControl/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/Char/IsControl/Project.csproj +++ b/snippets/csharp/System/Char/IsControl/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/Char/IsDigit/Project.csproj b/snippets/csharp/System/Char/IsDigit/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Char/IsDigit/Project.csproj +++ b/snippets/csharp/System/Char/IsDigit/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Char/IsHighSurrogate/Project.csproj b/snippets/csharp/System/Char/IsHighSurrogate/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Char/IsHighSurrogate/Project.csproj +++ b/snippets/csharp/System/Char/IsHighSurrogate/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Char/IsLetter/Project.csproj b/snippets/csharp/System/Char/IsLetter/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Char/IsLetter/Project.csproj +++ b/snippets/csharp/System/Char/IsLetter/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Char/IsLetterOrDigit/Project.csproj b/snippets/csharp/System/Char/IsLetterOrDigit/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Char/IsLetterOrDigit/Project.csproj +++ b/snippets/csharp/System/Char/IsLetterOrDigit/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Char/IsLower/Project.csproj b/snippets/csharp/System/Char/IsLower/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Char/IsLower/Project.csproj +++ b/snippets/csharp/System/Char/IsLower/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Char/IsNumber/Project.csproj b/snippets/csharp/System/Char/IsNumber/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/Char/IsNumber/Project.csproj +++ b/snippets/csharp/System/Char/IsNumber/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/Char/IsPunctuation/Project.csproj b/snippets/csharp/System/Char/IsPunctuation/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Char/IsPunctuation/Project.csproj +++ b/snippets/csharp/System/Char/IsPunctuation/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Char/IsSeparator/Project.csproj b/snippets/csharp/System/Char/IsSeparator/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/Char/IsSeparator/Project.csproj +++ b/snippets/csharp/System/Char/IsSeparator/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/Char/IsSurrogate/Project.csproj b/snippets/csharp/System/Char/IsSurrogate/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Char/IsSurrogate/Project.csproj +++ b/snippets/csharp/System/Char/IsSurrogate/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Char/IsSymbol/Project.csproj b/snippets/csharp/System/Char/IsSymbol/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Char/IsSymbol/Project.csproj +++ b/snippets/csharp/System/Char/IsSymbol/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Char/IsWhiteSpace/Project.csproj b/snippets/csharp/System/Char/IsWhiteSpace/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Char/IsWhiteSpace/Project.csproj +++ b/snippets/csharp/System/Char/IsWhiteSpace/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Char/Parse/Project.csproj b/snippets/csharp/System/Char/Parse/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Char/Parse/Project.csproj +++ b/snippets/csharp/System/Char/Parse/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Char/ToLower/Project.csproj b/snippets/csharp/System/Char/ToLower/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Char/ToLower/Project.csproj +++ b/snippets/csharp/System/Char/ToLower/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Char/ToString/Project.csproj b/snippets/csharp/System/Char/ToString/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Char/ToString/Project.csproj +++ b/snippets/csharp/System/Char/ToString/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Char/TryParse/Project.csproj b/snippets/csharp/System/Char/TryParse/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Char/TryParse/Project.csproj +++ b/snippets/csharp/System/Char/TryParse/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/CharEnumerator/Overview/Project.csproj b/snippets/csharp/System/CharEnumerator/Overview/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/CharEnumerator/Overview/Project.csproj +++ b/snippets/csharp/System/CharEnumerator/Overview/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Console/BufferHeight/Project.csproj b/snippets/csharp/System/Console/BufferHeight/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Console/BufferHeight/Project.csproj +++ b/snippets/csharp/System/Console/BufferHeight/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Console/CancelKeyPress/Project.csproj b/snippets/csharp/System/Console/CancelKeyPress/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Console/CancelKeyPress/Project.csproj +++ b/snippets/csharp/System/Console/CancelKeyPress/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Console/Clear/Project.csproj b/snippets/csharp/System/Console/Clear/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/Console/Clear/Project.csproj +++ b/snippets/csharp/System/Console/Clear/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/Console/CursorSize/Project.csproj b/snippets/csharp/System/Console/CursorSize/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Console/CursorSize/Project.csproj +++ b/snippets/csharp/System/Console/CursorSize/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Console/CursorVisible/Project.csproj b/snippets/csharp/System/Console/CursorVisible/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Console/CursorVisible/Project.csproj +++ b/snippets/csharp/System/Console/CursorVisible/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Console/Error/Project.csproj b/snippets/csharp/System/Console/Error/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/Console/Error/Project.csproj +++ b/snippets/csharp/System/Console/Error/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/Console/In/Project.csproj b/snippets/csharp/System/Console/In/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Console/In/Project.csproj +++ b/snippets/csharp/System/Console/In/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Console/KeyAvailable/Project.csproj b/snippets/csharp/System/Console/KeyAvailable/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Console/KeyAvailable/Project.csproj +++ b/snippets/csharp/System/Console/KeyAvailable/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Console/OpenStandardInput/Project.csproj b/snippets/csharp/System/Console/OpenStandardInput/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Console/OpenStandardInput/Project.csproj +++ b/snippets/csharp/System/Console/OpenStandardInput/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Console/OpenStandardOutput/Project.csproj b/snippets/csharp/System/Console/OpenStandardOutput/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Console/OpenStandardOutput/Project.csproj +++ b/snippets/csharp/System/Console/OpenStandardOutput/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Console/Out/Project.csproj b/snippets/csharp/System/Console/Out/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Console/Out/Project.csproj +++ b/snippets/csharp/System/Console/Out/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Console/Read/Project.csproj b/snippets/csharp/System/Console/Read/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Console/Read/Project.csproj +++ b/snippets/csharp/System/Console/Read/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Console/SetBufferSize/Project.csproj b/snippets/csharp/System/Console/SetBufferSize/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Console/SetBufferSize/Project.csproj +++ b/snippets/csharp/System/Console/SetBufferSize/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Console/SetError/Project.csproj b/snippets/csharp/System/Console/SetError/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Console/SetError/Project.csproj +++ b/snippets/csharp/System/Console/SetError/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Console/SetOut/Project.csproj b/snippets/csharp/System/Console/SetOut/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Console/SetOut/Project.csproj +++ b/snippets/csharp/System/Console/SetOut/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Console/SetWindowSize/Project.csproj b/snippets/csharp/System/Console/SetWindowSize/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Console/SetWindowSize/Project.csproj +++ b/snippets/csharp/System/Console/SetWindowSize/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Console/Title/Project.csproj b/snippets/csharp/System/Console/Title/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Console/Title/Project.csproj +++ b/snippets/csharp/System/Console/Title/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Console/WindowLeft/Project.csproj b/snippets/csharp/System/Console/WindowLeft/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Console/WindowLeft/Project.csproj +++ b/snippets/csharp/System/Console/WindowLeft/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/ConsoleKey/Overview/Project.csproj b/snippets/csharp/System/ConsoleKey/Overview/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/ConsoleKey/Overview/Project.csproj +++ b/snippets/csharp/System/ConsoleKey/Overview/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/ConsoleKeyInfo/Equals/Project.csproj b/snippets/csharp/System/ConsoleKeyInfo/Equals/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/ConsoleKeyInfo/Equals/Project.csproj +++ b/snippets/csharp/System/ConsoleKeyInfo/Equals/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/ConsoleKeyInfo/GetHashCode/Project.csproj b/snippets/csharp/System/ConsoleKeyInfo/GetHashCode/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/ConsoleKeyInfo/GetHashCode/Project.csproj +++ b/snippets/csharp/System/ConsoleKeyInfo/GetHashCode/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/ConsoleKeyInfo/KeyChar/Project.csproj b/snippets/csharp/System/ConsoleKeyInfo/KeyChar/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/ConsoleKeyInfo/KeyChar/Project.csproj +++ b/snippets/csharp/System/ConsoleKeyInfo/KeyChar/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Convert/DBNull/Project.csproj b/snippets/csharp/System/Convert/DBNull/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Convert/DBNull/Project.csproj +++ b/snippets/csharp/System/Convert/DBNull/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Convert/FromBase64CharArray/Project.csproj b/snippets/csharp/System/Convert/FromBase64CharArray/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/Convert/FromBase64CharArray/Project.csproj +++ b/snippets/csharp/System/Convert/FromBase64CharArray/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/Convert/Overview/Project.csproj b/snippets/csharp/System/Convert/Overview/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/Convert/Overview/Project.csproj +++ b/snippets/csharp/System/Convert/Overview/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/Convert/ToBase64String/Project.csproj b/snippets/csharp/System/Convert/ToBase64String/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Convert/ToBase64String/Project.csproj +++ b/snippets/csharp/System/Convert/ToBase64String/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Convert/ToBoolean/Project.csproj b/snippets/csharp/System/Convert/ToBoolean/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/Convert/ToBoolean/Project.csproj +++ b/snippets/csharp/System/Convert/ToBoolean/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/Convert/ToByte/Project.csproj b/snippets/csharp/System/Convert/ToByte/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Convert/ToByte/Project.csproj +++ b/snippets/csharp/System/Convert/ToByte/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Convert/ToChar/Project.csproj b/snippets/csharp/System/Convert/ToChar/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/Convert/ToChar/Project.csproj +++ b/snippets/csharp/System/Convert/ToChar/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/Convert/ToInt16/Project.csproj b/snippets/csharp/System/Convert/ToInt16/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/Convert/ToInt16/Project.csproj +++ b/snippets/csharp/System/Convert/ToInt16/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/ConverterTInput,TOutput/Overview/Project.csproj b/snippets/csharp/System/ConverterTInput,TOutput/Overview/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/ConverterTInput,TOutput/Overview/Project.csproj +++ b/snippets/csharp/System/ConverterTInput,TOutput/Overview/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/DateTime/Add/Project.csproj b/snippets/csharp/System/DateTime/Add/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/DateTime/Add/Project.csproj +++ b/snippets/csharp/System/DateTime/Add/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/DateTime/AddDays/Project.csproj b/snippets/csharp/System/DateTime/AddDays/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/DateTime/AddDays/Project.csproj +++ b/snippets/csharp/System/DateTime/AddDays/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/DateTime/AddHours/Project.csproj b/snippets/csharp/System/DateTime/AddHours/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/DateTime/AddHours/Project.csproj +++ b/snippets/csharp/System/DateTime/AddHours/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/DateTime/AddMilliseconds/Project.csproj b/snippets/csharp/System/DateTime/AddMilliseconds/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/DateTime/AddMilliseconds/Project.csproj +++ b/snippets/csharp/System/DateTime/AddMilliseconds/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/DateTime/AddMinutes/Project.csproj b/snippets/csharp/System/DateTime/AddMinutes/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/DateTime/AddMinutes/Project.csproj +++ b/snippets/csharp/System/DateTime/AddMinutes/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/DateTime/AddMonths/Project.csproj b/snippets/csharp/System/DateTime/AddMonths/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/DateTime/AddMonths/Project.csproj +++ b/snippets/csharp/System/DateTime/AddMonths/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/DateTime/AddSeconds/Project.csproj b/snippets/csharp/System/DateTime/AddSeconds/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/DateTime/AddSeconds/Project.csproj +++ b/snippets/csharp/System/DateTime/AddSeconds/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/DateTime/AddYears/Project.csproj b/snippets/csharp/System/DateTime/AddYears/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/DateTime/AddYears/Project.csproj +++ b/snippets/csharp/System/DateTime/AddYears/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/DateTime/Compare/Project.csproj b/snippets/csharp/System/DateTime/Compare/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/DateTime/Compare/Project.csproj +++ b/snippets/csharp/System/DateTime/Compare/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/DateTime/CompareTo/Project.csproj b/snippets/csharp/System/DateTime/CompareTo/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/DateTime/CompareTo/Project.csproj +++ b/snippets/csharp/System/DateTime/CompareTo/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/DateTime/Date/Project.csproj b/snippets/csharp/System/DateTime/Date/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/DateTime/Date/Project.csproj +++ b/snippets/csharp/System/DateTime/Date/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/DateTime/DayOfWeek/Project.csproj b/snippets/csharp/System/DateTime/DayOfWeek/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/DateTime/DayOfWeek/Project.csproj +++ b/snippets/csharp/System/DateTime/DayOfWeek/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/DateTime/DayOfYear/Project.csproj b/snippets/csharp/System/DateTime/DayOfYear/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/DateTime/DayOfYear/Project.csproj +++ b/snippets/csharp/System/DateTime/DayOfYear/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/DateTime/Equals/Project.csproj b/snippets/csharp/System/DateTime/Equals/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/DateTime/Equals/Project.csproj +++ b/snippets/csharp/System/DateTime/Equals/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/DateTime/FromBinary/Project.csproj b/snippets/csharp/System/DateTime/FromBinary/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/DateTime/FromBinary/Project.csproj +++ b/snippets/csharp/System/DateTime/FromBinary/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/DateTime/FromFileTime/Project.csproj b/snippets/csharp/System/DateTime/FromFileTime/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/DateTime/FromFileTime/Project.csproj +++ b/snippets/csharp/System/DateTime/FromFileTime/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/DateTime/GetDateTimeFormats/Project.csproj b/snippets/csharp/System/DateTime/GetDateTimeFormats/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/DateTime/GetDateTimeFormats/Project.csproj +++ b/snippets/csharp/System/DateTime/GetDateTimeFormats/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/DateTime/Hour/Project.csproj b/snippets/csharp/System/DateTime/Hour/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/DateTime/Hour/Project.csproj +++ b/snippets/csharp/System/DateTime/Hour/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/DateTime/IsLeapYear/Project.csproj b/snippets/csharp/System/DateTime/IsLeapYear/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/DateTime/IsLeapYear/Project.csproj +++ b/snippets/csharp/System/DateTime/IsLeapYear/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/DateTime/Kind/Project.csproj b/snippets/csharp/System/DateTime/Kind/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/DateTime/Kind/Project.csproj +++ b/snippets/csharp/System/DateTime/Kind/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/DateTime/MaxValue/Project.csproj b/snippets/csharp/System/DateTime/MaxValue/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/DateTime/MaxValue/Project.csproj +++ b/snippets/csharp/System/DateTime/MaxValue/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/DateTime/Millisecond/Project.csproj b/snippets/csharp/System/DateTime/Millisecond/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/DateTime/Millisecond/Project.csproj +++ b/snippets/csharp/System/DateTime/Millisecond/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/DateTime/Ticks/Project.csproj b/snippets/csharp/System/DateTime/Ticks/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/DateTime/Ticks/Project.csproj +++ b/snippets/csharp/System/DateTime/Ticks/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/DateTime/TimeOfDay/Project.csproj b/snippets/csharp/System/DateTime/TimeOfDay/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/DateTime/TimeOfDay/Project.csproj +++ b/snippets/csharp/System/DateTime/TimeOfDay/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/DateTime/ToFileTime/Project.csproj b/snippets/csharp/System/DateTime/ToFileTime/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/DateTime/ToFileTime/Project.csproj +++ b/snippets/csharp/System/DateTime/ToFileTime/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/DateTime/ToLongDateString/Project.csproj b/snippets/csharp/System/DateTime/ToLongDateString/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/DateTime/ToLongDateString/Project.csproj +++ b/snippets/csharp/System/DateTime/ToLongDateString/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/DateTime/ToLongTimeString/Project.csproj b/snippets/csharp/System/DateTime/ToLongTimeString/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/DateTime/ToLongTimeString/Project.csproj +++ b/snippets/csharp/System/DateTime/ToLongTimeString/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/DateTime/ToShortDateString/Project.csproj b/snippets/csharp/System/DateTime/ToShortDateString/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/DateTime/ToShortDateString/Project.csproj +++ b/snippets/csharp/System/DateTime/ToShortDateString/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/DateTime/ToString/tostring.csproj b/snippets/csharp/System/DateTime/ToString/tostring.csproj index 0db7a648e12..5b7223324ae 100644 --- a/snippets/csharp/System/DateTime/ToString/tostring.csproj +++ b/snippets/csharp/System/DateTime/ToString/tostring.csproj @@ -2,7 +2,7 @@ Exe - net9.0 + net10.0 enable MainClass diff --git a/snippets/csharp/System/DateTime/Today/Project.csproj b/snippets/csharp/System/DateTime/Today/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/DateTime/Today/Project.csproj +++ b/snippets/csharp/System/DateTime/Today/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/DateTime/Year/Project.csproj b/snippets/csharp/System/DateTime/Year/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/DateTime/Year/Project.csproj +++ b/snippets/csharp/System/DateTime/Year/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/DateTime/op_Addition/Project.csproj b/snippets/csharp/System/DateTime/op_Addition/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/DateTime/op_Addition/Project.csproj +++ b/snippets/csharp/System/DateTime/op_Addition/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/DateTime/op_Subtraction/Project.csproj b/snippets/csharp/System/DateTime/op_Subtraction/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/DateTime/op_Subtraction/Project.csproj +++ b/snippets/csharp/System/DateTime/op_Subtraction/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/DateTimeOffset/.ctor/Project.csproj b/snippets/csharp/System/DateTimeOffset/.ctor/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/DateTimeOffset/.ctor/Project.csproj +++ b/snippets/csharp/System/DateTimeOffset/.ctor/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/DateTimeOffset/Compare/Project.csproj b/snippets/csharp/System/DateTimeOffset/Compare/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/DateTimeOffset/Compare/Project.csproj +++ b/snippets/csharp/System/DateTimeOffset/Compare/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/DateTimeOffset/Date/Project.csproj b/snippets/csharp/System/DateTimeOffset/Date/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/DateTimeOffset/Date/Project.csproj +++ b/snippets/csharp/System/DateTimeOffset/Date/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/DateTimeOffset/FromFileTime/Project.csproj b/snippets/csharp/System/DateTimeOffset/FromFileTime/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/DateTimeOffset/FromFileTime/Project.csproj +++ b/snippets/csharp/System/DateTimeOffset/FromFileTime/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/DateTimeOffset/Now/Project.csproj b/snippets/csharp/System/DateTimeOffset/Now/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/DateTimeOffset/Now/Project.csproj +++ b/snippets/csharp/System/DateTimeOffset/Now/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/DateTimeOffset/Overview/Project.csproj b/snippets/csharp/System/DateTimeOffset/Overview/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/DateTimeOffset/Overview/Project.csproj +++ b/snippets/csharp/System/DateTimeOffset/Overview/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/DateTimeOffset/Parse/Project.csproj b/snippets/csharp/System/DateTimeOffset/Parse/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/DateTimeOffset/Parse/Project.csproj +++ b/snippets/csharp/System/DateTimeOffset/Parse/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/DateTimeOffset/ParseExact/Project.csproj b/snippets/csharp/System/DateTimeOffset/ParseExact/Project.csproj index b906551488a..974f3738a76 100644 --- a/snippets/csharp/System/DateTimeOffset/ParseExact/Project.csproj +++ b/snippets/csharp/System/DateTimeOffset/ParseExact/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 Example diff --git a/snippets/csharp/System/DateTimeOffset/ToOffset/Project.csproj b/snippets/csharp/System/DateTimeOffset/ToOffset/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/DateTimeOffset/ToOffset/Project.csproj +++ b/snippets/csharp/System/DateTimeOffset/ToOffset/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/DateTimeOffset/ToUnixTimeSeconds/Project.csproj b/snippets/csharp/System/DateTimeOffset/ToUnixTimeSeconds/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/DateTimeOffset/ToUnixTimeSeconds/Project.csproj +++ b/snippets/csharp/System/DateTimeOffset/ToUnixTimeSeconds/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/DateTimeOffset/TryParse/Project.csproj b/snippets/csharp/System/DateTimeOffset/TryParse/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/DateTimeOffset/TryParse/Project.csproj +++ b/snippets/csharp/System/DateTimeOffset/TryParse/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/DateTimeOffset/TryParseExact/Project.csproj b/snippets/csharp/System/DateTimeOffset/TryParseExact/Project.csproj index 1e0a646c50c..e581112a269 100644 --- a/snippets/csharp/System/DateTimeOffset/TryParseExact/Project.csproj +++ b/snippets/csharp/System/DateTimeOffset/TryParseExact/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 Class1 diff --git a/snippets/csharp/System/DateTimeOffset/op_Addition/Project.csproj b/snippets/csharp/System/DateTimeOffset/op_Addition/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/DateTimeOffset/op_Addition/Project.csproj +++ b/snippets/csharp/System/DateTimeOffset/op_Addition/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Decimal/Ceiling/Project.csproj b/snippets/csharp/System/Decimal/Ceiling/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Decimal/Ceiling/Project.csproj +++ b/snippets/csharp/System/Decimal/Ceiling/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Decimal/Compare/Project.csproj b/snippets/csharp/System/Decimal/Compare/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Decimal/Compare/Project.csproj +++ b/snippets/csharp/System/Decimal/Compare/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Decimal/CompareTo/Project.csproj b/snippets/csharp/System/Decimal/CompareTo/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/Decimal/CompareTo/Project.csproj +++ b/snippets/csharp/System/Decimal/CompareTo/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/Decimal/Divide/Project.csproj b/snippets/csharp/System/Decimal/Divide/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Decimal/Divide/Project.csproj +++ b/snippets/csharp/System/Decimal/Divide/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Decimal/Equals/Project.csproj b/snippets/csharp/System/Decimal/Equals/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Decimal/Equals/Project.csproj +++ b/snippets/csharp/System/Decimal/Equals/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Decimal/FromOACurrency/Project.csproj b/snippets/csharp/System/Decimal/FromOACurrency/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/Decimal/FromOACurrency/Project.csproj +++ b/snippets/csharp/System/Decimal/FromOACurrency/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/Decimal/GetBits/Project.csproj b/snippets/csharp/System/Decimal/GetBits/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/Decimal/GetBits/Project.csproj +++ b/snippets/csharp/System/Decimal/GetBits/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/Decimal/MinusOne/Project.csproj b/snippets/csharp/System/Decimal/MinusOne/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Decimal/MinusOne/Project.csproj +++ b/snippets/csharp/System/Decimal/MinusOne/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Decimal/Multiply/Project.csproj b/snippets/csharp/System/Decimal/Multiply/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/Decimal/Multiply/Project.csproj +++ b/snippets/csharp/System/Decimal/Multiply/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/Decimal/Negate/Project.csproj b/snippets/csharp/System/Decimal/Negate/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/Decimal/Negate/Project.csproj +++ b/snippets/csharp/System/Decimal/Negate/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/Decimal/Overview/Project.csproj b/snippets/csharp/System/Decimal/Overview/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/Decimal/Overview/Project.csproj +++ b/snippets/csharp/System/Decimal/Overview/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/Decimal/Remainder/Project.csproj b/snippets/csharp/System/Decimal/Remainder/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Decimal/Remainder/Project.csproj +++ b/snippets/csharp/System/Decimal/Remainder/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Decimal/Round/Rounding.csproj b/snippets/csharp/System/Decimal/Round/Rounding.csproj index 1508cc21dc1..32c061d6c13 100644 --- a/snippets/csharp/System/Decimal/Round/Rounding.csproj +++ b/snippets/csharp/System/Decimal/Round/Rounding.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 enable Example diff --git a/snippets/csharp/System/Decimal/ToByte/Project.csproj b/snippets/csharp/System/Decimal/ToByte/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Decimal/ToByte/Project.csproj +++ b/snippets/csharp/System/Decimal/ToByte/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Decimal/ToDouble/Project.csproj b/snippets/csharp/System/Decimal/ToDouble/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/Decimal/ToDouble/Project.csproj +++ b/snippets/csharp/System/Decimal/ToDouble/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/Decimal/ToInt16/Project.csproj b/snippets/csharp/System/Decimal/ToInt16/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Decimal/ToInt16/Project.csproj +++ b/snippets/csharp/System/Decimal/ToInt16/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Decimal/ToInt32/Project.csproj b/snippets/csharp/System/Decimal/ToInt32/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Decimal/ToInt32/Project.csproj +++ b/snippets/csharp/System/Decimal/ToInt32/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Decimal/ToInt64/Project.csproj b/snippets/csharp/System/Decimal/ToInt64/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Decimal/ToInt64/Project.csproj +++ b/snippets/csharp/System/Decimal/ToInt64/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Decimal/ToSByte/Project.csproj b/snippets/csharp/System/Decimal/ToSByte/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Decimal/ToSByte/Project.csproj +++ b/snippets/csharp/System/Decimal/ToSByte/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Decimal/ToString/Project.csproj b/snippets/csharp/System/Decimal/ToString/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/Decimal/ToString/Project.csproj +++ b/snippets/csharp/System/Decimal/ToString/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/Decimal/ToUInt16/Project.csproj b/snippets/csharp/System/Decimal/ToUInt16/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Decimal/ToUInt16/Project.csproj +++ b/snippets/csharp/System/Decimal/ToUInt16/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Decimal/ToUInt32/Project.csproj b/snippets/csharp/System/Decimal/ToUInt32/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Decimal/ToUInt32/Project.csproj +++ b/snippets/csharp/System/Decimal/ToUInt32/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Decimal/ToUInt64/Project.csproj b/snippets/csharp/System/Decimal/ToUInt64/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Decimal/ToUInt64/Project.csproj +++ b/snippets/csharp/System/Decimal/ToUInt64/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Decimal/TryParse/Project.csproj b/snippets/csharp/System/Decimal/TryParse/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Decimal/TryParse/Project.csproj +++ b/snippets/csharp/System/Decimal/TryParse/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Double/MaxValue/Project.csproj b/snippets/csharp/System/Double/MaxValue/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Double/MaxValue/Project.csproj +++ b/snippets/csharp/System/Double/MaxValue/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Double/MinValue/Project.csproj b/snippets/csharp/System/Double/MinValue/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Double/MinValue/Project.csproj +++ b/snippets/csharp/System/Double/MinValue/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Double/Overview/Project.csproj b/snippets/csharp/System/Double/Overview/Project.csproj index 274b5ecb6d6..f99395b4b2b 100644 --- a/snippets/csharp/System/Double/Overview/Project.csproj +++ b/snippets/csharp/System/Double/Overview/Project.csproj @@ -2,7 +2,7 @@ Exe - net10.0 + net10.0 diff --git a/snippets/csharp/System/Double/Parse/Project.csproj b/snippets/csharp/System/Double/Parse/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/Double/Parse/Project.csproj +++ b/snippets/csharp/System/Double/Parse/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/Enum/CompareTo/Project.csproj b/snippets/csharp/System/Enum/CompareTo/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Enum/CompareTo/Project.csproj +++ b/snippets/csharp/System/Enum/CompareTo/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Enum/Equals/Project.csproj b/snippets/csharp/System/Enum/Equals/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/Enum/Equals/Project.csproj +++ b/snippets/csharp/System/Enum/Equals/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/Enum/Format/Project.csproj b/snippets/csharp/System/Enum/Format/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Enum/Format/Project.csproj +++ b/snippets/csharp/System/Enum/Format/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Enum/GetName/Project.csproj b/snippets/csharp/System/Enum/GetName/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Enum/GetName/Project.csproj +++ b/snippets/csharp/System/Enum/GetName/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Enum/GetNames/Project.csproj b/snippets/csharp/System/Enum/GetNames/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/Enum/GetNames/Project.csproj +++ b/snippets/csharp/System/Enum/GetNames/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/Enum/GetUnderlyingType/Project.csproj b/snippets/csharp/System/Enum/GetUnderlyingType/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Enum/GetUnderlyingType/Project.csproj +++ b/snippets/csharp/System/Enum/GetUnderlyingType/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Enum/ToString/Project.csproj b/snippets/csharp/System/Enum/ToString/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/Enum/ToString/Project.csproj +++ b/snippets/csharp/System/Enum/ToString/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/Environment+SpecialFolder/Overview/Project.csproj b/snippets/csharp/System/Environment+SpecialFolder/Overview/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Environment+SpecialFolder/Overview/Project.csproj +++ b/snippets/csharp/System/Environment+SpecialFolder/Overview/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Environment/CommandLine/Project.csproj b/snippets/csharp/System/Environment/CommandLine/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Environment/CommandLine/Project.csproj +++ b/snippets/csharp/System/Environment/CommandLine/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Environment/CurrentDirectory/Project.csproj b/snippets/csharp/System/Environment/CurrentDirectory/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/Environment/CurrentDirectory/Project.csproj +++ b/snippets/csharp/System/Environment/CurrentDirectory/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/Environment/ExpandEnvironmentVariables/Project.csproj b/snippets/csharp/System/Environment/ExpandEnvironmentVariables/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Environment/ExpandEnvironmentVariables/Project.csproj +++ b/snippets/csharp/System/Environment/ExpandEnvironmentVariables/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Environment/FailFast/Project.csproj b/snippets/csharp/System/Environment/FailFast/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Environment/FailFast/Project.csproj +++ b/snippets/csharp/System/Environment/FailFast/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Environment/GetCommandLineArgs/Project.csproj b/snippets/csharp/System/Environment/GetCommandLineArgs/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Environment/GetCommandLineArgs/Project.csproj +++ b/snippets/csharp/System/Environment/GetCommandLineArgs/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Environment/GetEnvironmentVariables/Project.csproj b/snippets/csharp/System/Environment/GetEnvironmentVariables/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Environment/GetEnvironmentVariables/Project.csproj +++ b/snippets/csharp/System/Environment/GetEnvironmentVariables/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Environment/GetLogicalDrives/Project.csproj b/snippets/csharp/System/Environment/GetLogicalDrives/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Environment/GetLogicalDrives/Project.csproj +++ b/snippets/csharp/System/Environment/GetLogicalDrives/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Environment/MachineName/Project.csproj b/snippets/csharp/System/Environment/MachineName/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Environment/MachineName/Project.csproj +++ b/snippets/csharp/System/Environment/MachineName/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Environment/NewLine/Project.csproj b/snippets/csharp/System/Environment/NewLine/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Environment/NewLine/Project.csproj +++ b/snippets/csharp/System/Environment/NewLine/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Environment/Overview/Project.csproj b/snippets/csharp/System/Environment/Overview/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Environment/Overview/Project.csproj +++ b/snippets/csharp/System/Environment/Overview/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Environment/ProcessorCount/Project.csproj b/snippets/csharp/System/Environment/ProcessorCount/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Environment/ProcessorCount/Project.csproj +++ b/snippets/csharp/System/Environment/ProcessorCount/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Environment/StackTrace/Project.csproj b/snippets/csharp/System/Environment/StackTrace/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Environment/StackTrace/Project.csproj +++ b/snippets/csharp/System/Environment/StackTrace/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Environment/SystemDirectory/Project.csproj b/snippets/csharp/System/Environment/SystemDirectory/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Environment/SystemDirectory/Project.csproj +++ b/snippets/csharp/System/Environment/SystemDirectory/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Environment/UserInteractive/Project.csproj b/snippets/csharp/System/Environment/UserInteractive/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Environment/UserInteractive/Project.csproj +++ b/snippets/csharp/System/Environment/UserInteractive/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Environment/UserName/Project.csproj b/snippets/csharp/System/Environment/UserName/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Environment/UserName/Project.csproj +++ b/snippets/csharp/System/Environment/UserName/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Environment/Version/Project.csproj b/snippets/csharp/System/Environment/Version/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Environment/Version/Project.csproj +++ b/snippets/csharp/System/Environment/Version/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Environment/WorkingSet/Project.csproj b/snippets/csharp/System/Environment/WorkingSet/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Environment/WorkingSet/Project.csproj +++ b/snippets/csharp/System/Environment/WorkingSet/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/EventArgs/Overview/Project.csproj b/snippets/csharp/System/EventArgs/Overview/Project.csproj index 086145b6424..719fe867693 100644 --- a/snippets/csharp/System/EventArgs/Overview/Project.csproj +++ b/snippets/csharp/System/EventArgs/Overview/Project.csproj @@ -2,7 +2,7 @@ Exe - net8.0 + net10.0 enable diff --git a/snippets/csharp/System/Exception/.ctor/Project.csproj b/snippets/csharp/System/Exception/.ctor/Project.csproj index ef45acdbf04..c60cc4faeb7 100644 --- a/snippets/csharp/System/Exception/.ctor/Project.csproj +++ b/snippets/csharp/System/Exception/.ctor/Project.csproj @@ -1,7 +1,7 @@ Library - net4.8 + net10.0 diff --git a/snippets/csharp/System/Exception/Data/Project.csproj b/snippets/csharp/System/Exception/Data/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Exception/Data/Project.csproj +++ b/snippets/csharp/System/Exception/Data/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Exception/GetBaseException/Project.csproj b/snippets/csharp/System/Exception/GetBaseException/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Exception/GetBaseException/Project.csproj +++ b/snippets/csharp/System/Exception/GetBaseException/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Exception/HResult/Project.csproj b/snippets/csharp/System/Exception/HResult/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Exception/HResult/Project.csproj +++ b/snippets/csharp/System/Exception/HResult/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Exception/HelpLink/Project.csproj b/snippets/csharp/System/Exception/HelpLink/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Exception/HelpLink/Project.csproj +++ b/snippets/csharp/System/Exception/HelpLink/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Exception/InnerException/Project.csproj b/snippets/csharp/System/Exception/InnerException/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Exception/InnerException/Project.csproj +++ b/snippets/csharp/System/Exception/InnerException/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Exception/ToString/Project.csproj b/snippets/csharp/System/Exception/ToString/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Exception/ToString/Project.csproj +++ b/snippets/csharp/System/Exception/ToString/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/FuncT,TResult/Overview/Project.csproj b/snippets/csharp/System/FuncT,TResult/Overview/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/FuncT,TResult/Overview/Project.csproj +++ b/snippets/csharp/System/FuncT,TResult/Overview/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/FuncT1,T2,T3,TResult/Overview/Project.csproj b/snippets/csharp/System/FuncT1,T2,T3,TResult/Overview/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/FuncT1,T2,T3,TResult/Overview/Project.csproj +++ b/snippets/csharp/System/FuncT1,T2,T3,TResult/Overview/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/FuncT1,T2,TResult/Overview/Project.csproj b/snippets/csharp/System/FuncT1,T2,TResult/Overview/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/FuncT1,T2,TResult/Overview/Project.csproj +++ b/snippets/csharp/System/FuncT1,T2,TResult/Overview/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/GC/CancelFullGCNotification/Project.csproj b/snippets/csharp/System/GC/CancelFullGCNotification/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/GC/CancelFullGCNotification/Project.csproj +++ b/snippets/csharp/System/GC/CancelFullGCNotification/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/GC/GetGeneration/Project.csproj b/snippets/csharp/System/GC/GetGeneration/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/GC/GetGeneration/Project.csproj +++ b/snippets/csharp/System/GC/GetGeneration/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/GC/KeepAlive/Project.csproj b/snippets/csharp/System/GC/KeepAlive/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/GC/KeepAlive/Project.csproj +++ b/snippets/csharp/System/GC/KeepAlive/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/GC/Overview/Project.csproj b/snippets/csharp/System/GC/Overview/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/GC/Overview/Project.csproj +++ b/snippets/csharp/System/GC/Overview/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/GC/ReRegisterForFinalize/Project.csproj b/snippets/csharp/System/GC/ReRegisterForFinalize/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/GC/ReRegisterForFinalize/Project.csproj +++ b/snippets/csharp/System/GC/ReRegisterForFinalize/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/GC/SuppressFinalize/system.gc.suppressfinalize.csproj b/snippets/csharp/System/GC/SuppressFinalize/system.gc.suppressfinalize.csproj index 00b1ba25da0..45710f3c941 100644 --- a/snippets/csharp/System/GC/SuppressFinalize/system.gc.suppressfinalize.csproj +++ b/snippets/csharp/System/GC/SuppressFinalize/system.gc.suppressfinalize.csproj @@ -1,7 +1,7 @@ - net6.0 + net10.0 enable diff --git a/snippets/csharp/System/GC/WaitForPendingFinalizers/Project.csproj b/snippets/csharp/System/GC/WaitForPendingFinalizers/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/GC/WaitForPendingFinalizers/Project.csproj +++ b/snippets/csharp/System/GC/WaitForPendingFinalizers/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Guid/Empty/Project.csproj b/snippets/csharp/System/Guid/Empty/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Guid/Empty/Project.csproj +++ b/snippets/csharp/System/Guid/Empty/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Guid/NewGuid/Project.csproj b/snippets/csharp/System/Guid/NewGuid/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Guid/NewGuid/Project.csproj +++ b/snippets/csharp/System/Guid/NewGuid/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Guid/ToByteArray/Project.csproj b/snippets/csharp/System/Guid/ToByteArray/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Guid/ToByteArray/Project.csproj +++ b/snippets/csharp/System/Guid/ToByteArray/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/IComparable/Overview/Project.csproj b/snippets/csharp/System/IComparable/Overview/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/IComparable/Overview/Project.csproj +++ b/snippets/csharp/System/IComparable/Overview/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/IComparableT/Overview/Project.csproj b/snippets/csharp/System/IComparableT/Overview/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/IComparableT/Overview/Project.csproj +++ b/snippets/csharp/System/IComparableT/Overview/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/IConvertible/Overview/Project.csproj b/snippets/csharp/System/IConvertible/Overview/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/IConvertible/Overview/Project.csproj +++ b/snippets/csharp/System/IConvertible/Overview/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/ICustomFormatter/Overview/Project.csproj b/snippets/csharp/System/ICustomFormatter/Overview/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/ICustomFormatter/Overview/Project.csproj +++ b/snippets/csharp/System/ICustomFormatter/Overview/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/IDisposable/Overview/Dispose.csproj b/snippets/csharp/System/IDisposable/Overview/Dispose.csproj index 00b1ba25da0..45710f3c941 100644 --- a/snippets/csharp/System/IDisposable/Overview/Dispose.csproj +++ b/snippets/csharp/System/IDisposable/Overview/Dispose.csproj @@ -1,7 +1,7 @@ - net6.0 + net10.0 enable diff --git a/snippets/csharp/System/IEquatableT/Equals/Equals.csproj b/snippets/csharp/System/IEquatableT/Equals/Equals.csproj index 2150e3797ba..ed9781c223a 100644 --- a/snippets/csharp/System/IEquatableT/Equals/Equals.csproj +++ b/snippets/csharp/System/IEquatableT/Equals/Equals.csproj @@ -2,7 +2,7 @@ Exe - net8.0 + net10.0 enable enable diff --git a/snippets/csharp/System/IFormatProvider/Overview/Project.csproj b/snippets/csharp/System/IFormatProvider/Overview/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/IFormatProvider/Overview/Project.csproj +++ b/snippets/csharp/System/IFormatProvider/Overview/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/IFormattable/Overview/Project.csproj b/snippets/csharp/System/IFormattable/Overview/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/IFormattable/Overview/Project.csproj +++ b/snippets/csharp/System/IFormattable/Overview/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Int16/Equals/Project.csproj b/snippets/csharp/System/Int16/Equals/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/Int16/Equals/Project.csproj +++ b/snippets/csharp/System/Int16/Equals/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/Int16/MaxValue/Project.csproj b/snippets/csharp/System/Int16/MaxValue/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Int16/MaxValue/Project.csproj +++ b/snippets/csharp/System/Int16/MaxValue/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Int16/Parse/Project.csproj b/snippets/csharp/System/Int16/Parse/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/Int16/Parse/Project.csproj +++ b/snippets/csharp/System/Int16/Parse/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/Int16/ToString/Project.csproj b/snippets/csharp/System/Int16/ToString/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Int16/ToString/Project.csproj +++ b/snippets/csharp/System/Int16/ToString/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Int32/CompareTo/Project.csproj b/snippets/csharp/System/Int32/CompareTo/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Int32/CompareTo/Project.csproj +++ b/snippets/csharp/System/Int32/CompareTo/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Int32/Equals/Project.csproj b/snippets/csharp/System/Int32/Equals/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/Int32/Equals/Project.csproj +++ b/snippets/csharp/System/Int32/Equals/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/Int32/MaxValue/Project.csproj b/snippets/csharp/System/Int32/MaxValue/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Int32/MaxValue/Project.csproj +++ b/snippets/csharp/System/Int32/MaxValue/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Int32/ToString/Project.csproj b/snippets/csharp/System/Int32/ToString/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Int32/ToString/Project.csproj +++ b/snippets/csharp/System/Int32/ToString/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/Int32/TryParse/Project.csproj b/snippets/csharp/System/Int32/TryParse/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/Int32/TryParse/Project.csproj +++ b/snippets/csharp/System/Int32/TryParse/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/Int64/Equals/Project.csproj b/snippets/csharp/System/Int64/Equals/Project.csproj index 29255f5f4b1..c8263ab3adb 100644 --- a/snippets/csharp/System/Int64/Equals/Project.csproj +++ b/snippets/csharp/System/Int64/Equals/Project.csproj @@ -2,7 +2,7 @@ Library - net6.0 + net10.0 diff --git a/snippets/csharp/System/Int64/ToString/Project.csproj b/snippets/csharp/System/Int64/ToString/Project.csproj index aa9fd2ecaaf..ffb97e9872d 100644 --- a/snippets/csharp/System/Int64/ToString/Project.csproj +++ b/snippets/csharp/System/Int64/ToString/Project.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net10.0 \ No newline at end of file diff --git a/snippets/csharp/System/InvalidOperationException/Overview/WPF1/WPFCrossThreadCS.csproj b/snippets/csharp/System/InvalidOperationException/Overview/WPF1/WPFCrossThreadCS.csproj index 0165123cbed..72cd04e2254 100644 --- a/snippets/csharp/System/InvalidOperationException/Overview/WPF1/WPFCrossThreadCS.csproj +++ b/snippets/csharp/System/InvalidOperationException/Overview/WPF1/WPFCrossThreadCS.csproj @@ -2,7 +2,7 @@ WinExe - net6.0-windows + net10.0-windows True diff --git a/snippets/csharp/System/InvalidOperationException/Overview/WPF2/WPFCrossThreadDispatcherCS.csproj b/snippets/csharp/System/InvalidOperationException/Overview/WPF2/WPFCrossThreadDispatcherCS.csproj index 0165123cbed..72cd04e2254 100644 --- a/snippets/csharp/System/InvalidOperationException/Overview/WPF2/WPFCrossThreadDispatcherCS.csproj +++ b/snippets/csharp/System/InvalidOperationException/Overview/WPF2/WPFCrossThreadDispatcherCS.csproj @@ -2,7 +2,7 @@ WinExe - net6.0-windows + net10.0-windows True diff --git a/snippets/csharp/System/InvalidOperationException/Overview/WinForms/WFCrossThreadCS.csproj b/snippets/csharp/System/InvalidOperationException/Overview/WinForms/WFCrossThreadCS.csproj index 9aaa7593800..b1f6c771b02 100644 --- a/snippets/csharp/System/InvalidOperationException/Overview/WinForms/WFCrossThreadCS.csproj +++ b/snippets/csharp/System/InvalidOperationException/Overview/WinForms/WFCrossThreadCS.csproj @@ -2,7 +2,7 @@ WinExe - net6.0-windows + net10.0-windows True WFCrossThreadCS.Form1 From 19bf343191fef71994b291f1351d97c1788b66bb Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Thu, 25 Jun 2026 14:39:40 -0700 Subject: [PATCH 2/6] Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- snippets/csharp/System/EventArgs/Overview/Project.csproj | 2 +- .../Overview/WPF1/WPFCrossThreadCS.csproj | 2 +- .../Overview/WPF2/WPFCrossThreadDispatcherCS.csproj | 2 +- .../Overview/WinForms/WFCrossThreadCS.csproj | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/snippets/csharp/System/EventArgs/Overview/Project.csproj b/snippets/csharp/System/EventArgs/Overview/Project.csproj index 719fe867693..f9929d13fb7 100644 --- a/snippets/csharp/System/EventArgs/Overview/Project.csproj +++ b/snippets/csharp/System/EventArgs/Overview/Project.csproj @@ -3,7 +3,7 @@ Exe net10.0 - enable + enable diff --git a/snippets/csharp/System/InvalidOperationException/Overview/WPF1/WPFCrossThreadCS.csproj b/snippets/csharp/System/InvalidOperationException/Overview/WPF1/WPFCrossThreadCS.csproj index 72cd04e2254..2f3d6dbb1ab 100644 --- a/snippets/csharp/System/InvalidOperationException/Overview/WPF1/WPFCrossThreadCS.csproj +++ b/snippets/csharp/System/InvalidOperationException/Overview/WPF1/WPFCrossThreadCS.csproj @@ -3,7 +3,7 @@ WinExe net10.0-windows - True + true diff --git a/snippets/csharp/System/InvalidOperationException/Overview/WPF2/WPFCrossThreadDispatcherCS.csproj b/snippets/csharp/System/InvalidOperationException/Overview/WPF2/WPFCrossThreadDispatcherCS.csproj index 72cd04e2254..2f3d6dbb1ab 100644 --- a/snippets/csharp/System/InvalidOperationException/Overview/WPF2/WPFCrossThreadDispatcherCS.csproj +++ b/snippets/csharp/System/InvalidOperationException/Overview/WPF2/WPFCrossThreadDispatcherCS.csproj @@ -3,7 +3,7 @@ WinExe net10.0-windows - True + true diff --git a/snippets/csharp/System/InvalidOperationException/Overview/WinForms/WFCrossThreadCS.csproj b/snippets/csharp/System/InvalidOperationException/Overview/WinForms/WFCrossThreadCS.csproj index b1f6c771b02..575d3856cae 100644 --- a/snippets/csharp/System/InvalidOperationException/Overview/WinForms/WFCrossThreadCS.csproj +++ b/snippets/csharp/System/InvalidOperationException/Overview/WinForms/WFCrossThreadCS.csproj @@ -3,7 +3,7 @@ WinExe net10.0-windows - True + true WFCrossThreadCS.Form1 From 4d6648ee91b02eb15e7fa9906a8b952b4927c183 Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Thu, 25 Jun 2026 15:15:03 -0700 Subject: [PATCH 3/6] fix snippet errors --- .../ActivationContext/Overview/Project.csproj | 6 - .../ActivationContext/Overview/program.cs | 29 ---- .../ApplicationId/Overview/Project.csproj | 6 - .../System/ApplicationId/Overview/program.cs | 58 ------- .../System/Exception/.ctor/Project.csproj | 3 - .../System/Exception/.ctor/getobjdata.cs | 147 ------------------ .../System/ApplicationId/Overview/fs.fsproj | 10 -- .../System/ApplicationId/Overview/program.fs | 41 ----- .../ActivationContext/Overview/program.vb | 33 ---- .../System/ApplicationId/Overview/program.vb | 60 ------- xml/System/ApplicationId.xml | 42 ----- xml/System/ApplicationIdentity.xml | 18 --- 12 files changed, 453 deletions(-) delete mode 100644 snippets/csharp/System/ActivationContext/Overview/Project.csproj delete mode 100644 snippets/csharp/System/ActivationContext/Overview/program.cs delete mode 100644 snippets/csharp/System/ApplicationId/Overview/Project.csproj delete mode 100644 snippets/csharp/System/ApplicationId/Overview/program.cs delete mode 100644 snippets/csharp/System/Exception/.ctor/getobjdata.cs delete mode 100644 snippets/fsharp/System/ApplicationId/Overview/fs.fsproj delete mode 100644 snippets/fsharp/System/ApplicationId/Overview/program.fs delete mode 100644 snippets/visualbasic/System/ActivationContext/Overview/program.vb delete mode 100644 snippets/visualbasic/System/ApplicationId/Overview/program.vb diff --git a/snippets/csharp/System/ActivationContext/Overview/Project.csproj b/snippets/csharp/System/ActivationContext/Overview/Project.csproj deleted file mode 100644 index 1eddf5e00ac..00000000000 --- a/snippets/csharp/System/ActivationContext/Overview/Project.csproj +++ /dev/null @@ -1,6 +0,0 @@ - - - Library - net10.0 - - diff --git a/snippets/csharp/System/ActivationContext/Overview/program.cs b/snippets/csharp/System/ActivationContext/Overview/program.cs deleted file mode 100644 index 7556df94652..00000000000 --- a/snippets/csharp/System/ActivationContext/Overview/program.cs +++ /dev/null @@ -1,29 +0,0 @@ -// -using System; - -namespace ActivationContextSample -{ - public class Program : MarshalByRefObject - { - public static void Main(string[] args) - { - // - // - ActivationContext ac = AppDomain.CurrentDomain.ActivationContext; - ApplicationIdentity ai = ac.Identity; - // - Console.WriteLine("Full name = " + ai.FullName); - Console.WriteLine("Code base = " + ai.CodeBase); - // - - Console.Read(); - } - - public void Run() - { - Main(new string[] { }); - Console.ReadLine(); - } - } -} -// diff --git a/snippets/csharp/System/ApplicationId/Overview/Project.csproj b/snippets/csharp/System/ApplicationId/Overview/Project.csproj deleted file mode 100644 index 1eddf5e00ac..00000000000 --- a/snippets/csharp/System/ApplicationId/Overview/Project.csproj +++ /dev/null @@ -1,6 +0,0 @@ - - - Library - net10.0 - - diff --git a/snippets/csharp/System/ApplicationId/Overview/program.cs b/snippets/csharp/System/ApplicationId/Overview/program.cs deleted file mode 100644 index 5493c58269e..00000000000 --- a/snippets/csharp/System/ApplicationId/Overview/program.cs +++ /dev/null @@ -1,58 +0,0 @@ -// -using System; -using System.Collections; -using System.Text; -using System.Security.Policy; -using System.Reflection; -using System.Security; - -namespace ActivationContextSample -{ - public class Program : MarshalByRefObject - { - public static void Main(string[] args) - { - // - Console.WriteLine("Full name = " + - AppDomain.CurrentDomain.ActivationContext.Identity.FullName); - // - // - Console.WriteLine("Code base = " + - AppDomain.CurrentDomain.ActivationContext.Identity.CodeBase); - // - // - // - ApplicationSecurityInfo asi = new ApplicationSecurityInfo(AppDomain.CurrentDomain.ActivationContext); - - Console.WriteLine("ApplicationId.Name property = " + asi.ApplicationId.Name); - // - // - if (asi.ApplicationId.Culture != null) - Console.WriteLine("ApplicationId.Culture property = " + asi.ApplicationId.Culture.ToString()); - // - // - Console.WriteLine("ApplicationId.ProcessorArchitecture property = " + asi.ApplicationId.ProcessorArchitecture); - // - // - Console.WriteLine("ApplicationId.Version property = " + asi.ApplicationId.Version); - // - // - // To display the value of the public key, enumerate the Byte array for the property. - Console.Write("ApplicationId.PublicKeyToken property = "); - byte[] pk = asi.ApplicationId.PublicKeyToken; - for (int i = 0; i < pk.GetLength(0); i++) - Console.Write("{0:x}", pk[i]); - // - // - - Console.Read(); - } - - public void Run() - { - Main(new string[] { }); - Console.ReadLine(); - } - } -} -// diff --git a/snippets/csharp/System/Exception/.ctor/Project.csproj b/snippets/csharp/System/Exception/.ctor/Project.csproj index c60cc4faeb7..1eddf5e00ac 100644 --- a/snippets/csharp/System/Exception/.ctor/Project.csproj +++ b/snippets/csharp/System/Exception/.ctor/Project.csproj @@ -3,7 +3,4 @@ Library net10.0 - - - diff --git a/snippets/csharp/System/Exception/.ctor/getobjdata.cs b/snippets/csharp/System/Exception/.ctor/getobjdata.cs deleted file mode 100644 index 9b31d80abb6..00000000000 --- a/snippets/csharp/System/Exception/.ctor/getobjdata.cs +++ /dev/null @@ -1,147 +0,0 @@ -// -using System; -using System.IO; -using System.Runtime.Serialization; -using System.Runtime.Serialization.Formatters.Soap; - -// Define a serializable derived exception class. -[Serializable] -class SecondLevelException : Exception, ISerializable -{ - // This public constructor is used by class instantiators. - public SecondLevelException(string message, Exception inner) : - base(message, inner) - { - HelpLink = "http://MSDN.Microsoft.com"; - Source = "Exception_Class_Samples"; - } - - // This protected constructor is used for deserialization. - protected SecondLevelException(SerializationInfo info, - StreamingContext context) : - base(info, context) - { } - - // GetObjectData performs a custom serialization. - public override void GetObjectData(SerializationInfo info, - StreamingContext context) - { - // Change the case of two properties, and then use the - // method of the base class. - HelpLink = HelpLink.ToLower(); - Source = Source.ToUpperInvariant(); - - base.GetObjectData(info, context); - } -} - -class SerializationDemo -{ - public static void Main() - { - Console.WriteLine( - "This example of the Exception constructor " + - "and Exception.GetObjectData\nwith Serialization" + - "Info and StreamingContext parameters " + - "generates \nthe following output.\n"); - - try - { - // This code forces a division by 0 and catches the - // resulting exception. - try - { - int zero = 0; - int ecks = 1 / zero; - } - catch (Exception ex) - { - // Create a new exception to throw again. - SecondLevelException newExcept = - new SecondLevelException( - "Forced a division by 0 and threw " + - "another exception.", ex); - - Console.WriteLine( - "Forced a division by 0, caught the " + - "resulting exception, \n" + - "and created a derived exception:\n"); - Console.WriteLine("HelpLink: {0}", - newExcept.HelpLink); - Console.WriteLine("Source: {0}", - newExcept.Source); - - // This FileStream is used for the serialization. - FileStream stream = - new FileStream("NewException.dat", - FileMode.Create); - - try - { - // Serialize the derived exception. - SoapFormatter formatter = - new SoapFormatter(null, - new StreamingContext( - StreamingContextStates.File)); - formatter.Serialize(stream, newExcept); - - // Rewind the stream and deserialize the - // exception. - stream.Position = 0; - SecondLevelException deserExcept = - (SecondLevelException) - formatter.Deserialize(stream); - - Console.WriteLine( - "\nSerialized the exception, and then " + - "deserialized the resulting stream " + - "into a \nnew exception. " + - "The deserialization changed the case " + - "of certain properties:\n"); - - // Throw the deserialized exception again. - throw deserExcept; - } - catch (SerializationException se) - { - Console.WriteLine("Failed to serialize: {0}", - se.ToString()); - } - finally - { - stream.Close(); - } - } - } - catch (Exception ex) - { - Console.WriteLine("HelpLink: {0}", ex.HelpLink); - Console.WriteLine("Source: {0}", ex.Source); - - Console.WriteLine(); - Console.WriteLine(ex.ToString()); - } - } -} -/* -This example displays the following output. - -Forced a division by 0, caught the resulting exception, -and created a derived exception: - -HelpLink: http://MSDN.Microsoft.com -Source: Exception_Class_Samples - -Serialized the exception, and then deserialized the resulting stream into a -new exception. The deserialization changed the case of certain properties: - -HelpLink: http://msdn.microsoft.com -Source: EXCEPTION_CLASS_SAMPLES - -NDP_UE_CS.SecondLevelException: Forced a division by 0 and threw another except -ion. ---> System.DivideByZeroException: Attempted to divide by zero. - at NDP_UE_CS.SerializationDemo.Main() - --- End of inner exception stack trace --- - at NDP_UE_CS.SerializationDemo.Main() -*/ -// diff --git a/snippets/fsharp/System/ApplicationId/Overview/fs.fsproj b/snippets/fsharp/System/ApplicationId/Overview/fs.fsproj deleted file mode 100644 index 180a33ea226..00000000000 --- a/snippets/fsharp/System/ApplicationId/Overview/fs.fsproj +++ /dev/null @@ -1,10 +0,0 @@ - - - Exe - net48 - - - - - - \ No newline at end of file diff --git a/snippets/fsharp/System/ApplicationId/Overview/program.fs b/snippets/fsharp/System/ApplicationId/Overview/program.fs deleted file mode 100644 index 40e5ed8c3f2..00000000000 --- a/snippets/fsharp/System/ApplicationId/Overview/program.fs +++ /dev/null @@ -1,41 +0,0 @@ -// -open System -open System.Collections -open System.Text -open System.Security.Policy -open System.Reflection -open System.Security - -let main _ = - // - printfn $"Full name = {AppDomain.CurrentDomain.ActivationContext.Identity.FullName}" - // - // - printfn $"Code base = {AppDomain.CurrentDomain.ActivationContext.Identity.CodeBase}" - // - // - // - let asi = ApplicationSecurityInfo AppDomain.CurrentDomain.ActivationContext - - printfn $"ApplicationId.Name property = {asi.ApplicationId.Name}" - // - // - if asi.ApplicationId.Culture <> null then - printfn $"ApplicationId.Culture property = {asi.ApplicationId.Culture}" - // - // - printfn $"ApplicationId.ProcessorArchitecture property = {asi.ApplicationId.ProcessorArchitecture}" - // - // - printfn $"ApplicationId.Version property = {asi.ApplicationId.Version}" - // - // - // To display the value of the public key, enumerate the Byte array for the property. - printf "ApplicationId.PublicKeyToken property = " - let pk = asi.ApplicationId.PublicKeyToken - for i = 0 to pk.GetLength 0 - 1 do - printf $"{pk[i]:x}" - // - // - Console.Read() -// diff --git a/snippets/visualbasic/System/ActivationContext/Overview/program.vb b/snippets/visualbasic/System/ActivationContext/Overview/program.vb deleted file mode 100644 index 92bc9bb4a42..00000000000 --- a/snippets/visualbasic/System/ActivationContext/Overview/program.vb +++ /dev/null @@ -1,33 +0,0 @@ - ' -Imports System.Collections -Imports System.Text -Imports System.Security.Policy -Imports System.Reflection -Imports System.Security -Imports System.Security.Permissions - -Public Class Program - Inherits MarshalByRefObject - - _ - Public Shared Sub Main(ByVal args() As String) - ' - ' - Dim ac As ActivationContext = AppDomain.CurrentDomain.ActivationContext - Dim ai As ApplicationIdentity = ac.Identity - ' - Console.WriteLine("Full name = " + ai.FullName) - Console.WriteLine("Code base = " + ai.CodeBase) - ' - Console.Read() - - End Sub - - _ - Public Sub Run() - Main(New String() {}) - Console.ReadLine() - - End Sub -End Class -' \ No newline at end of file diff --git a/snippets/visualbasic/System/ApplicationId/Overview/program.vb b/snippets/visualbasic/System/ApplicationId/Overview/program.vb deleted file mode 100644 index 51e55b25dcf..00000000000 --- a/snippets/visualbasic/System/ApplicationId/Overview/program.vb +++ /dev/null @@ -1,60 +0,0 @@ -' -Imports System.Collections -Imports System.Text -Imports System.Security.Policy -Imports System.Reflection -Imports System.Security -Imports System.Security.Permissions - - - -Public Class Program - Inherits MarshalByRefObject - _ - Public Shared Sub Main(ByVal args() As String) - ' - Console.WriteLine("Full name = " + _ - AppDomain.CurrentDomain.ActivationContext.Identity.FullName) - ' - ' - Console.WriteLine("Code base = " + _ - AppDomain.CurrentDomain.ActivationContext.Identity.CodeBase) - ' - ' - ' - Dim asi As New ApplicationSecurityInfo(AppDomain.CurrentDomain.ActivationContext) - Console.WriteLine("ApplicationId.Name property = " + asi.ApplicationId.Name) - ' - ' - If Not (asi.ApplicationId.Culture Is Nothing) Then - Console.WriteLine("ApplicationId.Culture property = " + _ - asi.ApplicationId.Culture.ToString()) - End If - ' - ' - Console.WriteLine("ApplicationId.ProcessorArchitecture property = " + _ - asi.ApplicationId.ProcessorArchitecture) - ' - ' - Console.WriteLine("ApplicationId.Version property = " + _ - asi.ApplicationId.Version.ToString()) - ' - ' - ' To display the value of the public key, enumerate the Byte array for the property. - Console.Write("ApplicationId.PublicKeyToken property = ") - Dim pk As Byte() = asi.ApplicationId.PublicKeyToken - Dim i As Integer - For i = 0 To (pk.GetLength(0)) - Console.Write("{0:x}", pk(i)) - Next i - ' - ' - Console.Read() - - End Sub - - Public Sub Run() - Main(New String() {}) - End Sub -End Class -' \ No newline at end of file diff --git a/xml/System/ApplicationId.xml b/xml/System/ApplicationId.xml index 09f83f58506..00f21b6b53d 100644 --- a/xml/System/ApplicationId.xml +++ b/xml/System/ApplicationId.xml @@ -70,13 +70,6 @@ -## Examples - The following code example displays the properties by obtaining the from an instance created using the for the currently executing manifest-based application. - - :::code language="csharp" source="~/snippets/csharp/System/ApplicationId/Overview/program.cs" id="Snippet1"::: - :::code language="fsharp" source="~/snippets/fsharp/System/ApplicationId/Overview/program.fs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System/ApplicationId/Overview/program.vb" id="Snippet1"::: - ]]> @@ -277,13 +270,6 @@ -## Examples - The following code example displays the property by obtaining the from an instance created using the for the currently executing manifest-based application. This code example is part of a larger example provided for the class. - - :::code language="csharp" source="~/snippets/csharp/System/ApplicationId/Overview/program.cs" id="Snippet8"::: - :::code language="fsharp" source="~/snippets/fsharp/System/ApplicationId/Overview/program.fs" id="Snippet8"::: - :::code language="vb" source="~/snippets/visualbasic/System/ApplicationId/Overview/program.vb" id="Snippet8"::: - ]]> @@ -453,13 +439,6 @@ -## Examples - The following code example displays the property by obtaining the from an instance created using the for the currently executing manifest-based application. This code example is part of a larger example provided for the class. - - :::code language="csharp" source="~/snippets/csharp/System/ApplicationId/Overview/program.cs" id="Snippet7"::: - :::code language="fsharp" source="~/snippets/fsharp/System/ApplicationId/Overview/program.fs" id="Snippet7"::: - :::code language="vb" source="~/snippets/visualbasic/System/ApplicationId/Overview/program.vb" id="Snippet7"::: - ]]> @@ -520,13 +499,6 @@ -## Examples - The following code example displays the property by obtaining the from an instance created using the for the currently executing manifest-based application. This code example is part of a larger example provided for the class. - - :::code language="csharp" source="~/snippets/csharp/System/ApplicationId/Overview/program.cs" id="Snippet9"::: - :::code language="fsharp" source="~/snippets/fsharp/System/ApplicationId/Overview/program.fs" id="Snippet9"::: - :::code language="vb" source="~/snippets/visualbasic/System/ApplicationId/Overview/program.vb" id="Snippet9"::: - ]]> @@ -582,13 +554,6 @@ -## Examples - The following code example displays the property by obtaining the from an instance created using the for the currently executing manifest-based application. This code example is part of a larger example provided for the class. - - :::code language="csharp" source="~/snippets/csharp/System/ApplicationId/Overview/program.cs" id="Snippet11"::: - :::code language="fsharp" source="~/snippets/fsharp/System/ApplicationId/Overview/program.fs" id="Snippet11"::: - :::code language="vb" source="~/snippets/visualbasic/System/ApplicationId/Overview/program.vb" id="Snippet11"::: - ]]> @@ -694,13 +659,6 @@ -## Examples - The following code example displays the property by obtaining the from an instance created using the for the currently executing manifest-based application. This code example is part of a larger example provided for the class. - - :::code language="csharp" source="~/snippets/csharp/System/ApplicationId/Overview/program.cs" id="Snippet10"::: - :::code language="fsharp" source="~/snippets/fsharp/System/ApplicationId/Overview/program.fs" id="Snippet10"::: - :::code language="vb" source="~/snippets/visualbasic/System/ApplicationId/Overview/program.vb" id="Snippet10"::: - ]]> diff --git a/xml/System/ApplicationIdentity.xml b/xml/System/ApplicationIdentity.xml index 04b9157ea00..d1212e18d97 100644 --- a/xml/System/ApplicationIdentity.xml +++ b/xml/System/ApplicationIdentity.xml @@ -45,12 +45,6 @@ -## Examples - The following code example demonstrates the use of an object to obtain the for a manifest-based application. This code example is part of a larger example provided for the class. - - :::code language="csharp" source="~/snippets/csharp/System/ActivationContext/Overview/program.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System/ActivationContext/Overview/program.vb" id="Snippet2"::: - ]]> @@ -197,12 +191,6 @@ http://testserver/ActivationContext/ActivationContext.application -## Examples - The following code example demonstrates the use of an object to obtain the value of the property for a manifest-based application. This code example is part of a larger example provided for the class. - - :::code language="csharp" source="~/snippets/csharp/System/ActivationContext/Overview/program.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/System/ActivationContext/Overview/program.vb" id="Snippet3"::: - ]]> @@ -247,12 +235,6 @@ http://testserver/ActivationContext/ActivationContext.application -## Examples - The following code example demonstrates the use of an object to obtain the value of the property for a manifest-based application. This code example is part of a larger example provided for the class. - - :::code language="csharp" source="~/snippets/csharp/System/ActivationContext/Overview/program.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/System/ActivationContext/Overview/program.vb" id="Snippet3"::: - ]]> From d0fff2638d5e8f315e21f2d36e3af13348f237a5 Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Thu, 25 Jun 2026 15:50:26 -0700 Subject: [PATCH 4/6] add project files --- .../csharp/System/AppDomain/BaseDirectory/Project.csproj | 8 ++++++++ .../System/AppDomain/CreateComInstanceFrom/Project.csproj | 8 ++++++++ .../csharp/System/AppDomain/CreateDomain/Project.csproj | 8 ++++++++ .../AppDomain/CreateInstanceAndUnwrap/Project.csproj | 8 ++++++++ .../csharp/System/AppDomain/CurrentDomain/Project.csproj | 8 ++++++++ .../System/AppDomain/DefineDynamicAssembly/Project.csproj | 8 ++++++++ .../csharp/System/AppDomain/DoCallBack/Project.csproj | 8 ++++++++ .../System/AppDomain/DynamicDirectory/Project.csproj | 8 ++++++++ .../csharp/System/AppDomain/GetAssemblies/Project.csproj | 8 ++++++++ snippets/csharp/System/AppDomain/Id/Project.csproj | 8 ++++++++ .../csharp/System/AppDomain/IsFullyTrusted/Project.csproj | 8 ++++++++ snippets/csharp/System/AppDomain/Load/Project.csproj | 8 ++++++++ snippets/csharp/System/AppDomain/Overview/Project.csproj | 8 ++++++++ snippets/csharp/System/AppDomain/ToString/Project.csproj | 8 ++++++++ .../csharp/System/AppDomain/TypeResolve/Project.csproj | 8 ++++++++ .../csharp/System/AppDomain/{ => Unload}/Snippets.csproj | 0 16 files changed, 120 insertions(+) create mode 100644 snippets/csharp/System/AppDomain/BaseDirectory/Project.csproj create mode 100644 snippets/csharp/System/AppDomain/CreateComInstanceFrom/Project.csproj create mode 100644 snippets/csharp/System/AppDomain/CreateDomain/Project.csproj create mode 100644 snippets/csharp/System/AppDomain/CreateInstanceAndUnwrap/Project.csproj create mode 100644 snippets/csharp/System/AppDomain/CurrentDomain/Project.csproj create mode 100644 snippets/csharp/System/AppDomain/DefineDynamicAssembly/Project.csproj create mode 100644 snippets/csharp/System/AppDomain/DoCallBack/Project.csproj create mode 100644 snippets/csharp/System/AppDomain/DynamicDirectory/Project.csproj create mode 100644 snippets/csharp/System/AppDomain/GetAssemblies/Project.csproj create mode 100644 snippets/csharp/System/AppDomain/Id/Project.csproj create mode 100644 snippets/csharp/System/AppDomain/IsFullyTrusted/Project.csproj create mode 100644 snippets/csharp/System/AppDomain/Load/Project.csproj create mode 100644 snippets/csharp/System/AppDomain/Overview/Project.csproj create mode 100644 snippets/csharp/System/AppDomain/ToString/Project.csproj create mode 100644 snippets/csharp/System/AppDomain/TypeResolve/Project.csproj rename snippets/csharp/System/AppDomain/{ => Unload}/Snippets.csproj (100%) diff --git a/snippets/csharp/System/AppDomain/BaseDirectory/Project.csproj b/snippets/csharp/System/AppDomain/BaseDirectory/Project.csproj new file mode 100644 index 00000000000..ffb97e9872d --- /dev/null +++ b/snippets/csharp/System/AppDomain/BaseDirectory/Project.csproj @@ -0,0 +1,8 @@ + + + + Exe + net10.0 + + + \ No newline at end of file diff --git a/snippets/csharp/System/AppDomain/CreateComInstanceFrom/Project.csproj b/snippets/csharp/System/AppDomain/CreateComInstanceFrom/Project.csproj new file mode 100644 index 00000000000..ffb97e9872d --- /dev/null +++ b/snippets/csharp/System/AppDomain/CreateComInstanceFrom/Project.csproj @@ -0,0 +1,8 @@ + + + + Exe + net10.0 + + + \ No newline at end of file diff --git a/snippets/csharp/System/AppDomain/CreateDomain/Project.csproj b/snippets/csharp/System/AppDomain/CreateDomain/Project.csproj new file mode 100644 index 00000000000..ffb97e9872d --- /dev/null +++ b/snippets/csharp/System/AppDomain/CreateDomain/Project.csproj @@ -0,0 +1,8 @@ + + + + Exe + net10.0 + + + \ No newline at end of file diff --git a/snippets/csharp/System/AppDomain/CreateInstanceAndUnwrap/Project.csproj b/snippets/csharp/System/AppDomain/CreateInstanceAndUnwrap/Project.csproj new file mode 100644 index 00000000000..ffb97e9872d --- /dev/null +++ b/snippets/csharp/System/AppDomain/CreateInstanceAndUnwrap/Project.csproj @@ -0,0 +1,8 @@ + + + + Exe + net10.0 + + + \ No newline at end of file diff --git a/snippets/csharp/System/AppDomain/CurrentDomain/Project.csproj b/snippets/csharp/System/AppDomain/CurrentDomain/Project.csproj new file mode 100644 index 00000000000..ffb97e9872d --- /dev/null +++ b/snippets/csharp/System/AppDomain/CurrentDomain/Project.csproj @@ -0,0 +1,8 @@ + + + + Exe + net10.0 + + + \ No newline at end of file diff --git a/snippets/csharp/System/AppDomain/DefineDynamicAssembly/Project.csproj b/snippets/csharp/System/AppDomain/DefineDynamicAssembly/Project.csproj new file mode 100644 index 00000000000..ffb97e9872d --- /dev/null +++ b/snippets/csharp/System/AppDomain/DefineDynamicAssembly/Project.csproj @@ -0,0 +1,8 @@ + + + + Exe + net10.0 + + + \ No newline at end of file diff --git a/snippets/csharp/System/AppDomain/DoCallBack/Project.csproj b/snippets/csharp/System/AppDomain/DoCallBack/Project.csproj new file mode 100644 index 00000000000..ffb97e9872d --- /dev/null +++ b/snippets/csharp/System/AppDomain/DoCallBack/Project.csproj @@ -0,0 +1,8 @@ + + + + Exe + net10.0 + + + \ No newline at end of file diff --git a/snippets/csharp/System/AppDomain/DynamicDirectory/Project.csproj b/snippets/csharp/System/AppDomain/DynamicDirectory/Project.csproj new file mode 100644 index 00000000000..ffb97e9872d --- /dev/null +++ b/snippets/csharp/System/AppDomain/DynamicDirectory/Project.csproj @@ -0,0 +1,8 @@ + + + + Exe + net10.0 + + + \ No newline at end of file diff --git a/snippets/csharp/System/AppDomain/GetAssemblies/Project.csproj b/snippets/csharp/System/AppDomain/GetAssemblies/Project.csproj new file mode 100644 index 00000000000..ffb97e9872d --- /dev/null +++ b/snippets/csharp/System/AppDomain/GetAssemblies/Project.csproj @@ -0,0 +1,8 @@ + + + + Exe + net10.0 + + + \ No newline at end of file diff --git a/snippets/csharp/System/AppDomain/Id/Project.csproj b/snippets/csharp/System/AppDomain/Id/Project.csproj new file mode 100644 index 00000000000..ffb97e9872d --- /dev/null +++ b/snippets/csharp/System/AppDomain/Id/Project.csproj @@ -0,0 +1,8 @@ + + + + Exe + net10.0 + + + \ No newline at end of file diff --git a/snippets/csharp/System/AppDomain/IsFullyTrusted/Project.csproj b/snippets/csharp/System/AppDomain/IsFullyTrusted/Project.csproj new file mode 100644 index 00000000000..ffb97e9872d --- /dev/null +++ b/snippets/csharp/System/AppDomain/IsFullyTrusted/Project.csproj @@ -0,0 +1,8 @@ + + + + Exe + net10.0 + + + \ No newline at end of file diff --git a/snippets/csharp/System/AppDomain/Load/Project.csproj b/snippets/csharp/System/AppDomain/Load/Project.csproj new file mode 100644 index 00000000000..ffb97e9872d --- /dev/null +++ b/snippets/csharp/System/AppDomain/Load/Project.csproj @@ -0,0 +1,8 @@ + + + + Exe + net10.0 + + + \ No newline at end of file diff --git a/snippets/csharp/System/AppDomain/Overview/Project.csproj b/snippets/csharp/System/AppDomain/Overview/Project.csproj new file mode 100644 index 00000000000..ffb97e9872d --- /dev/null +++ b/snippets/csharp/System/AppDomain/Overview/Project.csproj @@ -0,0 +1,8 @@ + + + + Exe + net10.0 + + + \ No newline at end of file diff --git a/snippets/csharp/System/AppDomain/ToString/Project.csproj b/snippets/csharp/System/AppDomain/ToString/Project.csproj new file mode 100644 index 00000000000..ffb97e9872d --- /dev/null +++ b/snippets/csharp/System/AppDomain/ToString/Project.csproj @@ -0,0 +1,8 @@ + + + + Exe + net10.0 + + + \ No newline at end of file diff --git a/snippets/csharp/System/AppDomain/TypeResolve/Project.csproj b/snippets/csharp/System/AppDomain/TypeResolve/Project.csproj new file mode 100644 index 00000000000..ffb97e9872d --- /dev/null +++ b/snippets/csharp/System/AppDomain/TypeResolve/Project.csproj @@ -0,0 +1,8 @@ + + + + Exe + net10.0 + + + \ No newline at end of file diff --git a/snippets/csharp/System/AppDomain/Snippets.csproj b/snippets/csharp/System/AppDomain/Unload/Snippets.csproj similarity index 100% rename from snippets/csharp/System/AppDomain/Snippets.csproj rename to snippets/csharp/System/AppDomain/Unload/Snippets.csproj From 9f68f26f5ee05df2311dba5b814473c2866ad058 Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Thu, 25 Jun 2026 17:10:25 -0700 Subject: [PATCH 5/6] fix compile errors --- .../AppDomain/BaseDirectory/Project.csproj | 8 - .../System/AppDomain/BaseDirectory/adsetup.cs | 38 ---- .../CreateComInstanceFrom/Project.csproj | 8 - .../createcominstancefrom.cs | 36 ---- .../AppDomain/CreateDomain/Project.csproj | 8 - .../System/AppDomain/CreateDomain/setup.cs | 23 --- .../System/AppDomain/CreateDomain/source2.cs | 21 --- .../System/AppDomain/CreateDomain/source3.cs | 28 --- .../CreateInstanceAndUnwrap/Project.csproj | 8 - .../CreateInstanceAndUnwrap/addyno.cs | 170 ------------------ .../CreateInstanceAndUnwrap/ignorecase.cs | 32 ---- .../CreateInstanceAndUnwrap/source.cs | 38 ---- .../AppDomain/CurrentDomain/Project.csproj | 8 - .../CurrentDomain/adapplicationbase.cs | 32 ---- .../System/AppDomain/CurrentDomain/source2.cs | 25 --- .../DefineDynamicAssembly/Project.csproj | 8 - .../definedynamicassembly.cs | 50 ------ .../AppDomain/DefineDynamicAssembly/source.cs | 54 ------ .../AppDomain/DoCallBack/Project.csproj | 8 - .../AppDomain/DoCallBack/docallback_byref.cs | 34 ---- .../AppDomain/DoCallBack/docallback_byval.cs | 34 ---- .../AppDomain/DoCallBack/docallback_static.cs | 32 ---- .../AppDomain/DynamicDirectory/Project.csproj | 8 - .../DynamicDirectory/addynamicbase.cs | 105 ----------- .../AppDomain/GetAssemblies/Project.csproj | 8 - .../GetAssemblies/adgetassemblies.cs | 28 --- .../csharp/System/AppDomain/Id/Project.csproj | 8 - snippets/csharp/System/AppDomain/Id/source.cs | 33 ---- .../AppDomain/IsFullyTrusted/Project.csproj | 8 - .../AppDomain/IsFullyTrusted/example.cs | 63 ------- .../System/AppDomain/Load/Project.csproj | 8 - .../csharp/System/AppDomain/Load/loadraw.cs | 71 -------- .../csharp/System/AppDomain/Load/source.cs | 20 --- .../csharp/System/AppDomain/Load/source2.cs | 22 --- .../csharp/System/AppDomain/Load/source3.cs | 29 --- .../System/AppDomain/Overview/AppDomainX.cs | 99 ---------- .../System/AppDomain/Overview/Project.csproj | 8 - .../System/AppDomain/ToString/Project.csproj | 8 - .../System/AppDomain/ToString/adtostring.cs | 27 --- .../AppDomain/TypeResolve/Project.csproj | 8 - .../AppDomain/TypeResolve/typeresolve.cs | 79 -------- .../System/AppDomain/Unload/Snippets.csproj | 5 - .../System/AppDomain/Unload/adunload.cs | 34 ---- .../System/AppDomain/BaseDirectory/adsetup.fs | 29 --- .../System/AppDomain/BaseDirectory/fs.fsproj | 10 -- .../CreateInstanceAndUnwrap/addyno.fs | 156 ---------------- .../CreateInstanceAndUnwrap/fs.fsproj | 12 -- .../CreateInstanceAndUnwrap/ignorecase.fs | 27 --- .../CreateInstanceAndUnwrap/source.fs | 27 --- .../CurrentDomain/adapplicationbase.fs | 24 --- .../System/AppDomain/CurrentDomain/fs.fsproj | 10 -- .../DynamicDirectory/addynamicbase.fs | 92 ---------- .../GetAssemblies/adgetassemblies.fs | 19 -- .../System/AppDomain/GetAssemblies/fs.fsproj | 10 -- snippets/fsharp/System/AppDomain/Id/fs.fsproj | 10 -- snippets/fsharp/System/AppDomain/Id/source.fs | 25 --- .../fsharp/System/AppDomain/Load/fs.fsproj | 11 -- .../fsharp/System/AppDomain/Load/loadraw.fs | 62 ------- .../fsharp/System/AppDomain/Load/source.fs | 6 - .../System/AppDomain/ToString/adtostring.fs | 19 -- .../System/AppDomain/ToString/fs.fsproj | 10 -- .../System/AppDomain/TypeResolve/fs.fsproj | 10 -- .../AppDomain/TypeResolve/typeresolve.fs | 58 ------ .../System/AppDomain/BaseDirectory/adsetup.vb | 36 ---- .../CreateInstanceAndUnwrap/addyno.vb | 155 ---------------- .../CreateInstanceAndUnwrap/ignorecase.vb | 35 ---- .../CreateInstanceAndUnwrap/source.vb | 38 ---- .../CurrentDomain/adapplicationbase.vb | 30 ---- .../DynamicDirectory/addynamicbase.vb | 105 ----------- .../GetAssemblies/adgetassemblies.vb | 28 --- .../visualbasic/System/AppDomain/Id/source.vb | 33 ---- .../System/AppDomain/Load/loadraw.vb | 79 -------- .../System/AppDomain/Load/source.vb | 13 -- .../System/AppDomain/ToString/adtostring.vb | 28 --- .../AppDomain/TypeResolve/typeresolve.vb | 80 --------- xml/System/AppDomain.xml | 45 ----- 76 files changed, 2714 deletions(-) delete mode 100644 snippets/csharp/System/AppDomain/BaseDirectory/Project.csproj delete mode 100644 snippets/csharp/System/AppDomain/BaseDirectory/adsetup.cs delete mode 100644 snippets/csharp/System/AppDomain/CreateComInstanceFrom/Project.csproj delete mode 100644 snippets/csharp/System/AppDomain/CreateComInstanceFrom/createcominstancefrom.cs delete mode 100644 snippets/csharp/System/AppDomain/CreateDomain/Project.csproj delete mode 100644 snippets/csharp/System/AppDomain/CreateDomain/setup.cs delete mode 100644 snippets/csharp/System/AppDomain/CreateDomain/source2.cs delete mode 100644 snippets/csharp/System/AppDomain/CreateDomain/source3.cs delete mode 100644 snippets/csharp/System/AppDomain/CreateInstanceAndUnwrap/Project.csproj delete mode 100644 snippets/csharp/System/AppDomain/CreateInstanceAndUnwrap/addyno.cs delete mode 100644 snippets/csharp/System/AppDomain/CreateInstanceAndUnwrap/ignorecase.cs delete mode 100644 snippets/csharp/System/AppDomain/CreateInstanceAndUnwrap/source.cs delete mode 100644 snippets/csharp/System/AppDomain/CurrentDomain/Project.csproj delete mode 100644 snippets/csharp/System/AppDomain/CurrentDomain/adapplicationbase.cs delete mode 100644 snippets/csharp/System/AppDomain/CurrentDomain/source2.cs delete mode 100644 snippets/csharp/System/AppDomain/DefineDynamicAssembly/Project.csproj delete mode 100644 snippets/csharp/System/AppDomain/DefineDynamicAssembly/definedynamicassembly.cs delete mode 100644 snippets/csharp/System/AppDomain/DefineDynamicAssembly/source.cs delete mode 100644 snippets/csharp/System/AppDomain/DoCallBack/Project.csproj delete mode 100644 snippets/csharp/System/AppDomain/DoCallBack/docallback_byref.cs delete mode 100644 snippets/csharp/System/AppDomain/DoCallBack/docallback_byval.cs delete mode 100644 snippets/csharp/System/AppDomain/DoCallBack/docallback_static.cs delete mode 100644 snippets/csharp/System/AppDomain/DynamicDirectory/Project.csproj delete mode 100644 snippets/csharp/System/AppDomain/DynamicDirectory/addynamicbase.cs delete mode 100644 snippets/csharp/System/AppDomain/GetAssemblies/Project.csproj delete mode 100644 snippets/csharp/System/AppDomain/GetAssemblies/adgetassemblies.cs delete mode 100644 snippets/csharp/System/AppDomain/Id/Project.csproj delete mode 100644 snippets/csharp/System/AppDomain/Id/source.cs delete mode 100644 snippets/csharp/System/AppDomain/IsFullyTrusted/Project.csproj delete mode 100644 snippets/csharp/System/AppDomain/IsFullyTrusted/example.cs delete mode 100644 snippets/csharp/System/AppDomain/Load/Project.csproj delete mode 100644 snippets/csharp/System/AppDomain/Load/loadraw.cs delete mode 100644 snippets/csharp/System/AppDomain/Load/source.cs delete mode 100644 snippets/csharp/System/AppDomain/Load/source2.cs delete mode 100644 snippets/csharp/System/AppDomain/Load/source3.cs delete mode 100644 snippets/csharp/System/AppDomain/Overview/AppDomainX.cs delete mode 100644 snippets/csharp/System/AppDomain/Overview/Project.csproj delete mode 100644 snippets/csharp/System/AppDomain/ToString/Project.csproj delete mode 100644 snippets/csharp/System/AppDomain/ToString/adtostring.cs delete mode 100644 snippets/csharp/System/AppDomain/TypeResolve/Project.csproj delete mode 100644 snippets/csharp/System/AppDomain/TypeResolve/typeresolve.cs delete mode 100644 snippets/csharp/System/AppDomain/Unload/Snippets.csproj delete mode 100644 snippets/csharp/System/AppDomain/Unload/adunload.cs delete mode 100644 snippets/fsharp/System/AppDomain/BaseDirectory/adsetup.fs delete mode 100644 snippets/fsharp/System/AppDomain/BaseDirectory/fs.fsproj delete mode 100644 snippets/fsharp/System/AppDomain/CreateInstanceAndUnwrap/addyno.fs delete mode 100644 snippets/fsharp/System/AppDomain/CreateInstanceAndUnwrap/fs.fsproj delete mode 100644 snippets/fsharp/System/AppDomain/CreateInstanceAndUnwrap/ignorecase.fs delete mode 100644 snippets/fsharp/System/AppDomain/CreateInstanceAndUnwrap/source.fs delete mode 100644 snippets/fsharp/System/AppDomain/CurrentDomain/adapplicationbase.fs delete mode 100644 snippets/fsharp/System/AppDomain/CurrentDomain/fs.fsproj delete mode 100644 snippets/fsharp/System/AppDomain/DynamicDirectory/addynamicbase.fs delete mode 100644 snippets/fsharp/System/AppDomain/GetAssemblies/adgetassemblies.fs delete mode 100644 snippets/fsharp/System/AppDomain/GetAssemblies/fs.fsproj delete mode 100644 snippets/fsharp/System/AppDomain/Id/fs.fsproj delete mode 100644 snippets/fsharp/System/AppDomain/Id/source.fs delete mode 100644 snippets/fsharp/System/AppDomain/Load/fs.fsproj delete mode 100644 snippets/fsharp/System/AppDomain/Load/loadraw.fs delete mode 100644 snippets/fsharp/System/AppDomain/Load/source.fs delete mode 100644 snippets/fsharp/System/AppDomain/ToString/adtostring.fs delete mode 100644 snippets/fsharp/System/AppDomain/ToString/fs.fsproj delete mode 100644 snippets/fsharp/System/AppDomain/TypeResolve/fs.fsproj delete mode 100644 snippets/fsharp/System/AppDomain/TypeResolve/typeresolve.fs delete mode 100644 snippets/visualbasic/System/AppDomain/BaseDirectory/adsetup.vb delete mode 100644 snippets/visualbasic/System/AppDomain/CreateInstanceAndUnwrap/addyno.vb delete mode 100644 snippets/visualbasic/System/AppDomain/CreateInstanceAndUnwrap/ignorecase.vb delete mode 100644 snippets/visualbasic/System/AppDomain/CreateInstanceAndUnwrap/source.vb delete mode 100644 snippets/visualbasic/System/AppDomain/CurrentDomain/adapplicationbase.vb delete mode 100644 snippets/visualbasic/System/AppDomain/DynamicDirectory/addynamicbase.vb delete mode 100644 snippets/visualbasic/System/AppDomain/GetAssemblies/adgetassemblies.vb delete mode 100644 snippets/visualbasic/System/AppDomain/Id/source.vb delete mode 100644 snippets/visualbasic/System/AppDomain/Load/loadraw.vb delete mode 100644 snippets/visualbasic/System/AppDomain/Load/source.vb delete mode 100644 snippets/visualbasic/System/AppDomain/ToString/adtostring.vb delete mode 100644 snippets/visualbasic/System/AppDomain/TypeResolve/typeresolve.vb diff --git a/snippets/csharp/System/AppDomain/BaseDirectory/Project.csproj b/snippets/csharp/System/AppDomain/BaseDirectory/Project.csproj deleted file mode 100644 index ffb97e9872d..00000000000 --- a/snippets/csharp/System/AppDomain/BaseDirectory/Project.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Exe - net10.0 - - - \ No newline at end of file diff --git a/snippets/csharp/System/AppDomain/BaseDirectory/adsetup.cs b/snippets/csharp/System/AppDomain/BaseDirectory/adsetup.cs deleted file mode 100644 index 01e599ff147..00000000000 --- a/snippets/csharp/System/AppDomain/BaseDirectory/adsetup.cs +++ /dev/null @@ -1,38 +0,0 @@ -// -using System; -using System.IO; -using System.Reflection; -using System.Security.Policy; - -class ADSetupSnippet -{ - public static void Main() - { - // Create application domain setup information - var domaininfo = new AppDomainSetup(); - domaininfo.ConfigurationFile = Path.Combine(System.Environment.CurrentDirectory, "ADSetup.exe.config"); - domaininfo.ApplicationBase = System.Environment.CurrentDirectory; - - //Create evidence for the new appdomain from evidence of the current application domain - Evidence adEvidence = AppDomain.CurrentDomain.Evidence; - - // Create appdomain - AppDomain domain = AppDomain.CreateDomain("Domain2", adEvidence, domaininfo); - - // Display application domain information. - Console.WriteLine("Host domain: " + AppDomain.CurrentDomain.FriendlyName); - Console.WriteLine("Child domain: " + domain.FriendlyName); - Console.WriteLine(); - Console.WriteLine("Configuration file: " + domain.SetupInformation.ConfigurationFile); - Console.WriteLine("Application Base Directory: " + domain.BaseDirectory); - - AppDomain.Unload(domain); - } -} -// The example displays output like the following: -// Host domain: adsetup.exe -// Child domain: Domain2 -// -// Configuration file: C:\Test\ADSetup.exe.config -// Application Base Directory: C:\Test -// diff --git a/snippets/csharp/System/AppDomain/CreateComInstanceFrom/Project.csproj b/snippets/csharp/System/AppDomain/CreateComInstanceFrom/Project.csproj deleted file mode 100644 index ffb97e9872d..00000000000 --- a/snippets/csharp/System/AppDomain/CreateComInstanceFrom/Project.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Exe - net10.0 - - - \ No newline at end of file diff --git a/snippets/csharp/System/AppDomain/CreateComInstanceFrom/createcominstancefrom.cs b/snippets/csharp/System/AppDomain/CreateComInstanceFrom/createcominstancefrom.cs deleted file mode 100644 index df4b029c5f8..00000000000 --- a/snippets/csharp/System/AppDomain/CreateComInstanceFrom/createcominstancefrom.cs +++ /dev/null @@ -1,36 +0,0 @@ -// -using System; -using System.Reflection; -using System.Runtime.InteropServices; - -[ComVisible(true)] -class MyComVisibleType { - public MyComVisibleType() { - Console.WriteLine("MyComVisibleType instantiated!"); - } -} - -[ComVisible(false)] -class MyComNonVisibleType { - public MyComNonVisibleType() { - Console.WriteLine("MyComNonVisibleType instantiated!"); - } -} - -class CreateComInstanceFromSnippet { - public static void Main() { - CreateComInstance("MyComNonVisibleType"); // Fail! - CreateComInstance("MyComVisibleType"); // OK! - } - - static void CreateComInstance(string typeName) { - try { - AppDomain currentDomain = AppDomain.CurrentDomain; - string assemblyName = currentDomain.FriendlyName; - currentDomain.CreateComInstanceFrom(assemblyName, typeName); - } catch (Exception e) { - Console.WriteLine(e.Message); - } - } -} -// diff --git a/snippets/csharp/System/AppDomain/CreateDomain/Project.csproj b/snippets/csharp/System/AppDomain/CreateDomain/Project.csproj deleted file mode 100644 index ffb97e9872d..00000000000 --- a/snippets/csharp/System/AppDomain/CreateDomain/Project.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Exe - net10.0 - - - \ No newline at end of file diff --git a/snippets/csharp/System/AppDomain/CreateDomain/setup.cs b/snippets/csharp/System/AppDomain/CreateDomain/setup.cs deleted file mode 100644 index 70f1785e30d..00000000000 --- a/snippets/csharp/System/AppDomain/CreateDomain/setup.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Security.Policy; - -class CreateDomainSnippet1 { - - public static void Main() { - // - // Set up the AppDomainSetup - AppDomainSetup setup = new AppDomainSetup(); - setup.ApplicationBase = "(some directory)"; - setup.ConfigurationFile = "(some file)"; - - // Set up the Evidence - Evidence baseEvidence = AppDomain.CurrentDomain.Evidence; - Evidence evidence = new Evidence(baseEvidence); - evidence.AddAssembly("(some assembly)"); - evidence.AddHost("(some host)"); - - // Create the AppDomain - AppDomain newDomain = AppDomain.CreateDomain("newDomain", evidence, setup); - // - } -} diff --git a/snippets/csharp/System/AppDomain/CreateDomain/source2.cs b/snippets/csharp/System/AppDomain/CreateDomain/source2.cs deleted file mode 100644 index 74921048fed..00000000000 --- a/snippets/csharp/System/AppDomain/CreateDomain/source2.cs +++ /dev/null @@ -1,21 +0,0 @@ -// -using System; -using System.Reflection; - -class CreateDomainSnippet2 -{ - public static void Main() - { - // Create the new application domain. - AppDomain domain = AppDomain.CreateDomain("MyDomain", null); - - // Output to the console. - Console.WriteLine("Host domain: " + AppDomain.CurrentDomain.FriendlyName); - Console.WriteLine("New domain: " + domain.FriendlyName); - Console.WriteLine("Application base is: " + domain.BaseDirectory); - Console.WriteLine("Relative search path is: " + domain.RelativeSearchPath); - Console.WriteLine("Shadow copy files is set to: " + domain.ShadowCopyFiles); - AppDomain.Unload(domain); - } -} -// diff --git a/snippets/csharp/System/AppDomain/CreateDomain/source3.cs b/snippets/csharp/System/AppDomain/CreateDomain/source3.cs deleted file mode 100644 index 0525b44d51f..00000000000 --- a/snippets/csharp/System/AppDomain/CreateDomain/source3.cs +++ /dev/null @@ -1,28 +0,0 @@ -// -using System; -using System.Reflection; - -class CreateDomainSnippet3 -{ - public static void Main() - { - // Application domain setup information. - AppDomainSetup domaininfo = new AppDomainSetup(); - domaininfo.ApplicationBase = "f:\\work\\development\\latest"; - domaininfo.ConfigurationFile = "f:\\work\\development\\latest\\appdomain5.exe.config"; - - // Creates the application domain. - AppDomain domain = AppDomain.CreateDomain("MyDomain", null, domaininfo); - - // Write the application domain information to the console. - Console.WriteLine("Host domain: " + AppDomain.CurrentDomain.FriendlyName); - Console.WriteLine("Child domain: " + domain.FriendlyName); - Console.WriteLine(); - Console.WriteLine("Application base is: " + domain.SetupInformation.ApplicationBase); - Console.WriteLine("Configuration file is: " + domain.SetupInformation.ConfigurationFile); - - // Unloads the application domain. - AppDomain.Unload(domain); - } -} -// diff --git a/snippets/csharp/System/AppDomain/CreateInstanceAndUnwrap/Project.csproj b/snippets/csharp/System/AppDomain/CreateInstanceAndUnwrap/Project.csproj deleted file mode 100644 index ffb97e9872d..00000000000 --- a/snippets/csharp/System/AppDomain/CreateInstanceAndUnwrap/Project.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Exe - net10.0 - - - \ No newline at end of file diff --git a/snippets/csharp/System/AppDomain/CreateInstanceAndUnwrap/addyno.cs b/snippets/csharp/System/AppDomain/CreateInstanceAndUnwrap/addyno.cs deleted file mode 100644 index 5259af7f71a..00000000000 --- a/snippets/csharp/System/AppDomain/CreateInstanceAndUnwrap/addyno.cs +++ /dev/null @@ -1,170 +0,0 @@ -// -using System; -using System.IO; -using System.Threading; -using System.Reflection; -using System.Reflection.Emit; -using System.Runtime.Remoting; - -class ADDyno -{ - public static Type CreateADynamicAssembly(ref AppDomain myNewDomain, - string executableNameNoExe) - { - string executableName = executableNameNoExe + ".exe"; - - AssemblyName myAsmName = new AssemblyName(); - myAsmName.Name = executableNameNoExe; - myAsmName.CodeBase = Environment.CurrentDirectory; - - AssemblyBuilder myAsmBuilder = myNewDomain.DefineDynamicAssembly(myAsmName, - AssemblyBuilderAccess.RunAndSave); - Console.WriteLine("-- Dynamic Assembly instantiated."); - - ModuleBuilder myModBuilder = myAsmBuilder.DefineDynamicModule(executableNameNoExe, - executableName); - - TypeBuilder myTypeBuilder = myModBuilder.DefineType(executableNameNoExe, - TypeAttributes.Public, - typeof(MarshalByRefObject)); - - MethodBuilder myFCMethod = myTypeBuilder.DefineMethod("CountLocalFiles", - MethodAttributes.Public | - MethodAttributes.Static, - null, - new Type[] { }); - - MethodInfo currentDirGetMI = typeof(Environment).GetProperty("CurrentDirectory").GetGetMethod(); - MethodInfo writeLine0objMI = typeof(Console).GetMethod("WriteLine", - new Type[] { typeof(string) }); - MethodInfo writeLine2objMI = typeof(Console).GetMethod("WriteLine", - new Type[] { typeof(string), typeof(object), typeof(object) }); - MethodInfo getFilesMI = typeof(Directory).GetMethod("GetFiles", - new Type[] { typeof(string) }); - - myFCMethod.InitLocals = true; - - ILGenerator myFCIL = myFCMethod.GetILGenerator(); - - Console.WriteLine("-- Generating MSIL method body..."); - LocalBuilder v0 = myFCIL.DeclareLocal(typeof(string)); - LocalBuilder v1 = myFCIL.DeclareLocal(typeof(int)); - LocalBuilder v2 = myFCIL.DeclareLocal(typeof(string)); - LocalBuilder v3 = myFCIL.DeclareLocal(typeof(string[])); - - Label evalForEachLabel = myFCIL.DefineLabel(); - Label topOfForEachLabel = myFCIL.DefineLabel(); - - // Build the method body. - - myFCIL.EmitCall(OpCodes.Call, currentDirGetMI, null); - myFCIL.Emit(OpCodes.Stloc_S, v0); - myFCIL.Emit(OpCodes.Ldc_I4_0); - myFCIL.Emit(OpCodes.Stloc_S, v1); - myFCIL.Emit(OpCodes.Ldstr, "---"); - myFCIL.EmitCall(OpCodes.Call, writeLine0objMI, null); - myFCIL.Emit(OpCodes.Ldloc_S, v0); - myFCIL.EmitCall(OpCodes.Call, getFilesMI, null); - myFCIL.Emit(OpCodes.Stloc_S, v3); - - myFCIL.Emit(OpCodes.Br_S, evalForEachLabel); - - // foreach loop starts here. - myFCIL.MarkLabel(topOfForEachLabel); - - // Load array of strings and index, store value at index for output. - myFCIL.Emit(OpCodes.Ldloc_S, v3); - myFCIL.Emit(OpCodes.Ldloc_S, v1); - myFCIL.Emit(OpCodes.Ldelem_Ref); - myFCIL.Emit(OpCodes.Stloc_S, v2); - - myFCIL.Emit(OpCodes.Ldloc_S, v2); - myFCIL.EmitCall(OpCodes.Call, writeLine0objMI, null); - - // Increment counter by one. - myFCIL.Emit(OpCodes.Ldloc_S, v1); - myFCIL.Emit(OpCodes.Ldc_I4_1); - myFCIL.Emit(OpCodes.Add); - myFCIL.Emit(OpCodes.Stloc_S, v1); - - // Determine if end of file list array has been reached. - myFCIL.MarkLabel(evalForEachLabel); - myFCIL.Emit(OpCodes.Ldloc_S, v1); - myFCIL.Emit(OpCodes.Ldloc_S, v3); - myFCIL.Emit(OpCodes.Ldlen); - myFCIL.Emit(OpCodes.Conv_I4); - myFCIL.Emit(OpCodes.Blt_S, topOfForEachLabel); - //foreach loop end here. - - myFCIL.Emit(OpCodes.Ldstr, "---"); - myFCIL.EmitCall(OpCodes.Call, writeLine0objMI, null); - myFCIL.Emit(OpCodes.Ldstr, "There are {0} files in {1}."); - myFCIL.Emit(OpCodes.Ldloc_S, v1); - myFCIL.Emit(OpCodes.Box, typeof(int)); - myFCIL.Emit(OpCodes.Ldloc_S, v0); - myFCIL.EmitCall(OpCodes.Call, writeLine2objMI, null); - - myFCIL.Emit(OpCodes.Ret); - - Type myType = myTypeBuilder.CreateType(); - - myAsmBuilder.SetEntryPoint(myFCMethod); - myAsmBuilder.Save(executableName); - Console.WriteLine("-- Method generated, type completed, and assembly saved to disk."); - - return myType; - } - - public static void Main() - { - - string domainDir, executableName = null; - - Console.Write("Enter a name for the file counting assembly: "); - string executableNameNoExe = Console.ReadLine(); - executableName = executableNameNoExe + ".exe"; - Console.WriteLine("---"); - - domainDir = Environment.CurrentDirectory; - - AppDomain curDomain = Thread.GetDomain(); - - // Create a new AppDomain, with the current directory as the base. - - Console.WriteLine("Current Directory: {0}", Environment.CurrentDirectory); - AppDomainSetup mySetupInfo = new AppDomainSetup(); - mySetupInfo.ApplicationBase = domainDir; - mySetupInfo.ApplicationName = executableNameNoExe; - mySetupInfo.LoaderOptimization = LoaderOptimization.SingleDomain; - - AppDomain myDomain = AppDomain.CreateDomain(executableNameNoExe, - null, mySetupInfo); - - Console.WriteLine("Creating a new AppDomain '{0}'...", - executableNameNoExe); - - Console.WriteLine("-- Base Directory = '{0}'", myDomain.BaseDirectory); - Console.WriteLine("-- Shadow Copy? = '{0}'", myDomain.ShadowCopyFiles); - - Console.WriteLine("---"); - Type myFCType = CreateADynamicAssembly(ref curDomain, - executableNameNoExe); - - Console.WriteLine("Loading '{0}' from '{1}'...", executableName, - myDomain.BaseDirectory.ToString()); - - BindingFlags bFlags = (BindingFlags.Public | BindingFlags.CreateInstance | - BindingFlags.Instance); - - Object myObjInstance = myDomain.CreateInstanceAndUnwrap(executableNameNoExe, - executableNameNoExe, false, bFlags, - null, null, null, null, null); - - Console.WriteLine("Executing method 'CountLocalFiles' in {0}...", - myObjInstance.ToString()); - - myFCType.InvokeMember("CountLocalFiles", BindingFlags.InvokeMethod, null, - myObjInstance, new object[] { }); - } -} -// diff --git a/snippets/csharp/System/AppDomain/CreateInstanceAndUnwrap/ignorecase.cs b/snippets/csharp/System/AppDomain/CreateInstanceAndUnwrap/ignorecase.cs deleted file mode 100644 index 4db903087aa..00000000000 --- a/snippets/csharp/System/AppDomain/CreateInstanceAndUnwrap/ignorecase.cs +++ /dev/null @@ -1,32 +0,0 @@ -// -using System; -using System.Reflection; - -class IgnoreCaseSnippet { - - static void Main() { - InstantiateINT32(false); // Failed! - InstantiateINT32(true); // OK! - } - - static void InstantiateINT32(bool ignoreCase) { - try { - AppDomain currentDomain = AppDomain.CurrentDomain; - object instance = currentDomain.CreateInstanceAndUnwrap( - "mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", - "SYSTEM.INT32", - ignoreCase, - BindingFlags.Default, - null, - null, - null, - null, - null - ); - Console.WriteLine(instance.GetType()); - } catch (TypeLoadException e) { - Console.WriteLine(e.Message); - } - } -} -// diff --git a/snippets/csharp/System/AppDomain/CreateInstanceAndUnwrap/source.cs b/snippets/csharp/System/AppDomain/CreateInstanceAndUnwrap/source.cs deleted file mode 100644 index 61dcdb7df1f..00000000000 --- a/snippets/csharp/System/AppDomain/CreateInstanceAndUnwrap/source.cs +++ /dev/null @@ -1,38 +0,0 @@ -// -using System; -using System.Reflection; - -public class CreateInstanceWorker : MarshalByRefObject -{ - public void PrintDomain() - { - Console.WriteLine("Object is executing in AppDomain \"{0}\"", - AppDomain.CurrentDomain.FriendlyName); - } -} - -class CreateInstanceAndUnwrapSourceSnippet -{ - public static void Main() - { - // Create an ordinary instance in the current AppDomain - CreateInstanceWorker localWorker = new CreateInstanceWorker(); - localWorker.PrintDomain(); - - // Create a new application domain, create an instance - // of Worker in the application domain, and execute code - // there. - AppDomain ad = AppDomain.CreateDomain("New domain"); - CreateInstanceWorker remoteWorker = (CreateInstanceWorker) ad.CreateInstanceAndUnwrap( - typeof(CreateInstanceWorker).Assembly.FullName, - "Worker"); - remoteWorker.PrintDomain(); - } -} - -/* This code produces output similar to the following: - -Object is executing in AppDomain "source.exe" -Object is executing in AppDomain "New domain" - */ -// diff --git a/snippets/csharp/System/AppDomain/CurrentDomain/Project.csproj b/snippets/csharp/System/AppDomain/CurrentDomain/Project.csproj deleted file mode 100644 index ffb97e9872d..00000000000 --- a/snippets/csharp/System/AppDomain/CurrentDomain/Project.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Exe - net10.0 - - - \ No newline at end of file diff --git a/snippets/csharp/System/AppDomain/CurrentDomain/adapplicationbase.cs b/snippets/csharp/System/AppDomain/CurrentDomain/adapplicationbase.cs deleted file mode 100644 index 3c466b46396..00000000000 --- a/snippets/csharp/System/AppDomain/CurrentDomain/adapplicationbase.cs +++ /dev/null @@ -1,32 +0,0 @@ -// -using System; - -class ADSetupInformation -{ - static void Main() - { - AppDomain root = AppDomain.CurrentDomain; - - AppDomainSetup setup = new AppDomainSetup(); - setup.ApplicationBase = - root.SetupInformation.ApplicationBase + @"MyAppSubfolder\"; - - AppDomain domain = AppDomain.CreateDomain("MyDomain", null, setup); - - Console.WriteLine("Application base of {0}:\r\n\t{1}", - root.FriendlyName, root.SetupInformation.ApplicationBase); - Console.WriteLine("Application base of {0}:\r\n\t{1}", - domain.FriendlyName, domain.SetupInformation.ApplicationBase); - - AppDomain.Unload(domain); - } -} - -/* This example produces output similar to the following: - -Application base of MyApp.exe: - C:\Program Files\MyApp\ -Application base of MyDomain: - C:\Program Files\MyApp\MyAppSubfolder\ - */ -// diff --git a/snippets/csharp/System/AppDomain/CurrentDomain/source2.cs b/snippets/csharp/System/AppDomain/CurrentDomain/source2.cs deleted file mode 100644 index c66041135a0..00000000000 --- a/snippets/csharp/System/AppDomain/CurrentDomain/source2.cs +++ /dev/null @@ -1,25 +0,0 @@ -// -using System; -using System.Reflection; - -class AppDomain4 -{ - public static void Main() - { - // Create application domain setup information. - AppDomainSetup domaininfo = new AppDomainSetup(); - domaininfo.ApplicationBase = "f:\\work\\development\\latest"; - - // Create the application domain. - AppDomain domain = AppDomain.CreateDomain("MyDomain", null, domaininfo); - - // Write application domain information to the console. - Console.WriteLine("Host domain: " + AppDomain.CurrentDomain.FriendlyName); - Console.WriteLine("child domain: " + domain.FriendlyName); - Console.WriteLine("Application base is: " + domain.SetupInformation.ApplicationBase); - - // Unload the application domain. - AppDomain.Unload(domain); - } -} -// diff --git a/snippets/csharp/System/AppDomain/DefineDynamicAssembly/Project.csproj b/snippets/csharp/System/AppDomain/DefineDynamicAssembly/Project.csproj deleted file mode 100644 index ffb97e9872d..00000000000 --- a/snippets/csharp/System/AppDomain/DefineDynamicAssembly/Project.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Exe - net10.0 - - - \ No newline at end of file diff --git a/snippets/csharp/System/AppDomain/DefineDynamicAssembly/definedynamicassembly.cs b/snippets/csharp/System/AppDomain/DefineDynamicAssembly/definedynamicassembly.cs deleted file mode 100644 index 6f32e828e2b..00000000000 --- a/snippets/csharp/System/AppDomain/DefineDynamicAssembly/definedynamicassembly.cs +++ /dev/null @@ -1,50 +0,0 @@ -// -using System; -using System.Reflection; -using System.Reflection.Emit; - -class DefinedDynamicAssemblySnippet { - public static void Main() { - AppDomain currentDomain = AppDomain.CurrentDomain; - - InstantiateMyDynamicType(currentDomain); // Failed! - - currentDomain.AssemblyResolve += new ResolveEventHandler(MyResolveEventHandler); - - InstantiateMyDynamicType(currentDomain); // OK! - } - - static void InstantiateMyDynamicType(AppDomain domain) { - try { - // You must supply a valid fully qualified assembly name here. - domain.CreateInstance("Assembly text name, Version, Culture, PublicKeyToken", "MyDynamicType"); - } catch (Exception e) { - Console.WriteLine(e.Message); - } - } - - static Assembly MyResolveEventHandler(object sender, ResolveEventArgs args) { - return DefineDynamicAssembly((AppDomain) sender); - } - - static Assembly DefineDynamicAssembly(AppDomain domain) { - // Build a dynamic assembly using Reflection Emit API. - - AssemblyName assemblyName = new AssemblyName(); - assemblyName.Name = "MyDynamicAssembly"; - - AssemblyBuilder assemblyBuilder = domain.DefineDynamicAssembly(assemblyName, AssemblyBuilderAccess.Run); - ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule("MyDynamicModule"); - TypeBuilder typeBuilder = moduleBuilder.DefineType("MyDynamicType", TypeAttributes.Public); - ConstructorBuilder constructorBuilder = typeBuilder.DefineConstructor(MethodAttributes.Public, CallingConventions.Standard, null); - ILGenerator ilGenerator = constructorBuilder.GetILGenerator(); - - ilGenerator.EmitWriteLine("MyDynamicType instantiated!"); - ilGenerator.Emit(OpCodes.Ret); - - typeBuilder.CreateType(); - - return assemblyBuilder; - } -} -// diff --git a/snippets/csharp/System/AppDomain/DefineDynamicAssembly/source.cs b/snippets/csharp/System/AppDomain/DefineDynamicAssembly/source.cs deleted file mode 100644 index 5cb1bc846eb..00000000000 --- a/snippets/csharp/System/AppDomain/DefineDynamicAssembly/source.cs +++ /dev/null @@ -1,54 +0,0 @@ -// -using System; -using System.Reflection; -using System.Reflection.Emit; -using System.Security; - -class CustomAttributeBuilderSnippet -{ - static void Main() - { - // Create a CustomAttributeBuilder for the assembly attribute. - // - // SecurityTransparentAttribute has a parameterless constructor, - // which is retrieved by passing an array of empty types for the - // constructor's parameter types. The CustomAttributeBuilder is - // then created by passing the ConstructorInfo and an empty array - // of objects to represent the parameters. - // - ConstructorInfo transparentCtor = - typeof(SecurityTransparentAttribute).GetConstructor( - Type.EmptyTypes); - CustomAttributeBuilder transparent = new CustomAttributeBuilder( - transparentCtor, - new Object[] {} ); - - // Create a dynamic assembly using the attribute. The attribute is - // passed as an array with one element. - AssemblyName aName = new AssemblyName("EmittedAssembly"); - AssemblyBuilder ab = AppDomain.CurrentDomain.DefineDynamicAssembly( - aName, - AssemblyBuilderAccess.Run, - new CustomAttributeBuilder[] { transparent } ); - - ModuleBuilder mb = ab.DefineDynamicModule( aName.Name ); - TypeBuilder tb = mb.DefineType( - "MyDynamicType", - TypeAttributes.Public ); - tb.CreateType(); - - Console.WriteLine("{0}\nAssembly attributes:", ab); - foreach (Attribute attr in ab.GetCustomAttributes(true)) - { - Console.WriteLine("\t{0}", attr); - } - } -} - -/* This code example produces the following output: - -EmittedAssembly, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null -Assembly attributes: - System.Security.SecurityTransparentAttribute - */ -// diff --git a/snippets/csharp/System/AppDomain/DoCallBack/Project.csproj b/snippets/csharp/System/AppDomain/DoCallBack/Project.csproj deleted file mode 100644 index ffb97e9872d..00000000000 --- a/snippets/csharp/System/AppDomain/DoCallBack/Project.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Exe - net10.0 - - - \ No newline at end of file diff --git a/snippets/csharp/System/AppDomain/DoCallBack/docallback_byref.cs b/snippets/csharp/System/AppDomain/DoCallBack/docallback_byref.cs deleted file mode 100644 index 4d5863e1ac5..00000000000 --- a/snippets/csharp/System/AppDomain/DoCallBack/docallback_byref.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; - -// -public class CallbackByRefSnippet : MarshalByRefObject -{ - private string greetings = "PING!"; - - public static void Main() - { - AppDomain otherDomain = AppDomain.CreateDomain("otherDomain"); - - CallbackByRefSnippet pp = new CallbackByRefSnippet(); - pp.MyCallBack(); - pp.greetings = "PONG!"; - otherDomain.DoCallBack(new CrossAppDomainDelegate(pp.MyCallBack)); - - // Output: - // PING! from defaultDomain - // PONG! from defaultDomain - } - - // Callback will always execute within defaultDomain due to inheritance from - // MarshalByRefObject - public void MyCallBack() - { - string name = AppDomain.CurrentDomain.FriendlyName; - if (name == AppDomain.CurrentDomain.SetupInformation.ApplicationName) - { - name = "defaultDomain"; - } - Console.WriteLine(greetings + " from " + name); - } -} -// diff --git a/snippets/csharp/System/AppDomain/DoCallBack/docallback_byval.cs b/snippets/csharp/System/AppDomain/DoCallBack/docallback_byval.cs deleted file mode 100644 index b718d5be123..00000000000 --- a/snippets/csharp/System/AppDomain/DoCallBack/docallback_byval.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; - -// -[Serializable] -public class CallbackByValSnippet -{ - private string greetings = "PING!"; - - public static void Main() - { - AppDomain otherDomain = AppDomain.CreateDomain("otherDomain"); - - CallbackByValSnippet pp = new CallbackByValSnippet(); - pp.MyCallBack(); - pp.greetings = "PONG!"; - otherDomain.DoCallBack(new CrossAppDomainDelegate(pp.MyCallBack)); - - // Output: - // PING! from defaultDomain - // PONG! from otherDomain - } - - public void MyCallBack() - { - string name = AppDomain.CurrentDomain.FriendlyName; - - if (name == AppDomain.CurrentDomain.SetupInformation.ApplicationName) - { - name = "defaultDomain"; - } - Console.WriteLine(greetings + " from " + name); - } -} -// diff --git a/snippets/csharp/System/AppDomain/DoCallBack/docallback_static.cs b/snippets/csharp/System/AppDomain/DoCallBack/docallback_static.cs deleted file mode 100644 index 6d4060bd539..00000000000 --- a/snippets/csharp/System/AppDomain/DoCallBack/docallback_static.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; - -public class CallbackStaticSnippet -{ - // - static string greetings = "PONG!"; - - public static void Main() - { - AppDomain otherDomain = AppDomain.CreateDomain("otherDomain"); - - greetings = "PING!"; - MyCallBack(); - otherDomain.DoCallBack(new CrossAppDomainDelegate(MyCallBack)); - - // Output: - // PING! from defaultDomain - // PONG! from otherDomain - } - - static public void MyCallBack() - { - string name = AppDomain.CurrentDomain.FriendlyName; - - if (name == AppDomain.CurrentDomain.SetupInformation.ApplicationName) - { - name = "defaultDomain"; - } - Console.WriteLine(greetings + " from " + name); - } - // -} diff --git a/snippets/csharp/System/AppDomain/DynamicDirectory/Project.csproj b/snippets/csharp/System/AppDomain/DynamicDirectory/Project.csproj deleted file mode 100644 index ffb97e9872d..00000000000 --- a/snippets/csharp/System/AppDomain/DynamicDirectory/Project.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Exe - net10.0 - - - \ No newline at end of file diff --git a/snippets/csharp/System/AppDomain/DynamicDirectory/addynamicbase.cs b/snippets/csharp/System/AppDomain/DynamicDirectory/addynamicbase.cs deleted file mode 100644 index 3d1c0f390ef..00000000000 --- a/snippets/csharp/System/AppDomain/DynamicDirectory/addynamicbase.cs +++ /dev/null @@ -1,105 +0,0 @@ -// -using System; -using System.Reflection; -using System.Reflection.Emit; - -public class AddDynamicBaseSnippet : MarshalByRefObject -{ - static void Main() - { - // Prepare to create a new application domain. - AppDomainSetup setup = new AppDomainSetup(); - - // Set the application name before setting the dynamic base. - setup.ApplicationName = "Example"; - - // Set the location of the base directory where assembly resolution - // probes for dynamic assemblies. Note that the hash code of the - // application name is concatenated to the base directory name you - // supply. - setup.DynamicBase = "C:\\DynamicAssemblyDir"; - Console.WriteLine("DynamicBase is set to '{0}'.", setup.DynamicBase); - - AppDomain ad = AppDomain.CreateDomain("MyDomain", null, setup); - - // The dynamic directory name is the dynamic base concatenated with - // the application name: \\ - string dynamicDir = ad.DynamicDirectory; - Console.WriteLine("Dynamic directory is '{0}'.", dynamicDir); - - // The AssemblyBuilder won't create this directory automatically. - if (!System.IO.Directory.Exists(dynamicDir)) - { - Console.WriteLine("Creating the dynamic directory."); - System.IO.Directory.CreateDirectory(dynamicDir); - } - - // Generate a dynamic assembly and store it in the dynamic - // directory. - GenerateDynamicAssembly(dynamicDir); - - // Create an instance of the Example class in the application domain, - // and call its Test method to load the dynamic assembly and use it. - AddDynamicBaseSnippet ex = (AddDynamicBaseSnippet) ad.CreateInstanceAndUnwrap( - typeof(AddDynamicBaseSnippet).Assembly.FullName, "Example"); - ex.Test(); - } - - public void Test() - { - Assembly dynAssem = Assembly.Load( - "DynamicHelloWorld, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"); - - Type myType = dynAssem.GetType("HelloWorld"); - myType.InvokeMember("HelloFromAD", BindingFlags.Public | - BindingFlags.Static | BindingFlags.InvokeMethod, - Type.DefaultBinder, null, null); - } - - private static void GenerateDynamicAssembly(string location) - { - // Define the dynamic assembly and the module. There is only one - // module in this assembly. Note that the call to DefineDynamicAssembly - // specifies the location where the assembly will be saved. The - // assembly version is 1.0.0.0. - // - AssemblyName asmName = new AssemblyName("DynamicHelloWorld"); - asmName.Version = new Version("1.0.0.0"); - - AssemblyBuilder ab = - AppDomain.CurrentDomain.DefineDynamicAssembly( - asmName, AssemblyBuilderAccess.Save, location); - - String moduleName = asmName.Name + ".exe"; - ModuleBuilder mb = ab.DefineDynamicModule(asmName.Name, moduleName); - - // Define the "HelloWorld" type, with one static method. - TypeBuilder tb = mb.DefineType("HelloWorld", TypeAttributes.Public); - MethodBuilder hello = tb.DefineMethod("HelloFromAD", - MethodAttributes.Public | MethodAttributes.Static, null, null); - - // The method displays a message that contains the name of the application - // domain where the method is executed. - ILGenerator il = hello.GetILGenerator(); - il.Emit(OpCodes.Ldstr, "Hello from '{0}'!"); - il.Emit(OpCodes.Call, typeof(AppDomain).GetProperty("CurrentDomain").GetGetMethod()); - il.Emit(OpCodes.Call, typeof(AppDomain).GetProperty("FriendlyName").GetGetMethod()); - il.Emit(OpCodes.Call, typeof(Console).GetMethod("WriteLine", - new Type[] { typeof(String), typeof(String) })); - il.Emit(OpCodes.Ret); - - // Complete the HelloWorld type and save the assembly. The assembly - // is placed in the location specified by DefineDynamicAssembly. - Type myType = tb.CreateType(); - ab.Save(moduleName); - } -} - -/* This example produces output similar to the following: - -DynamicBase is set to 'C:\DynamicAssemblyDir\5e4a7545'. -Dynamic directory is 'C:\DynamicAssemblyDir\5e4a7545\Example'. -Creating the dynamic directory. -Hello from 'MyDomain'! - */ -// diff --git a/snippets/csharp/System/AppDomain/GetAssemblies/Project.csproj b/snippets/csharp/System/AppDomain/GetAssemblies/Project.csproj deleted file mode 100644 index ffb97e9872d..00000000000 --- a/snippets/csharp/System/AppDomain/GetAssemblies/Project.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Exe - net10.0 - - - \ No newline at end of file diff --git a/snippets/csharp/System/AppDomain/GetAssemblies/adgetassemblies.cs b/snippets/csharp/System/AppDomain/GetAssemblies/adgetassemblies.cs deleted file mode 100644 index 511f19b59c3..00000000000 --- a/snippets/csharp/System/AppDomain/GetAssemblies/adgetassemblies.cs +++ /dev/null @@ -1,28 +0,0 @@ -// -using System; -using System.Reflection; -using System.Security.Policy; - -class ADGetAssemblies -{ - - public static void Main() - { - AppDomain currentDomain = AppDomain.CurrentDomain; - //Provide the current application domain evidence for the assembly. - Evidence asEvidence = currentDomain.Evidence; - //Load the assembly from the application directory using a simple name. - - //Create an assembly called CustomLibrary to run this sample. - currentDomain.Load("CustomLibrary",asEvidence); - - //Make an array for the list of assemblies. - Assembly[] assems = currentDomain.GetAssemblies(); - - //List the assemblies in the current application domain. - Console.WriteLine("List of assemblies loaded in current appdomain:"); - foreach (Assembly assem in assems) - Console.WriteLine(assem.ToString()); - } -} -// \ No newline at end of file diff --git a/snippets/csharp/System/AppDomain/Id/Project.csproj b/snippets/csharp/System/AppDomain/Id/Project.csproj deleted file mode 100644 index ffb97e9872d..00000000000 --- a/snippets/csharp/System/AppDomain/Id/Project.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Exe - net10.0 - - - \ No newline at end of file diff --git a/snippets/csharp/System/AppDomain/Id/source.cs b/snippets/csharp/System/AppDomain/Id/source.cs deleted file mode 100644 index 2e6d5dec800..00000000000 --- a/snippets/csharp/System/AppDomain/Id/source.cs +++ /dev/null @@ -1,33 +0,0 @@ -// -using System; -using System.Reflection; - -public class AppDomainIdSnippet -{ - // The following attribute indicates to the loader that assemblies - // in the global assembly cache should be shared across multiple - // application domains. - [LoaderOptimizationAttribute( LoaderOptimization.MultiDomainHost)] - public static void Main() - { - // Show information for the default application domain. - ShowDomainInfo(); - - // Create a new application domain and display its information. - AppDomain newDomain = AppDomain.CreateDomain("MyMultiDomain"); - newDomain.DoCallBack(new CrossAppDomainDelegate(ShowDomainInfo)); - } - - // This method has the same signature as the CrossAppDomainDelegate, - // so that it can be executed easily in the new application domain. - // - public static void ShowDomainInfo() - { - AppDomain ad = AppDomain.CurrentDomain; - Console.WriteLine(); - Console.WriteLine("FriendlyName: {0}", ad.FriendlyName); - Console.WriteLine("Id: {0}", ad.Id); - Console.WriteLine("IsDefaultAppDomain: {0}", ad.IsDefaultAppDomain()); - } -} -// diff --git a/snippets/csharp/System/AppDomain/IsFullyTrusted/Project.csproj b/snippets/csharp/System/AppDomain/IsFullyTrusted/Project.csproj deleted file mode 100644 index ffb97e9872d..00000000000 --- a/snippets/csharp/System/AppDomain/IsFullyTrusted/Project.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Exe - net10.0 - - - \ No newline at end of file diff --git a/snippets/csharp/System/AppDomain/IsFullyTrusted/example.cs b/snippets/csharp/System/AppDomain/IsFullyTrusted/example.cs deleted file mode 100644 index eef2b4dd55f..00000000000 --- a/snippets/csharp/System/AppDomain/IsFullyTrusted/example.cs +++ /dev/null @@ -1,63 +0,0 @@ -// -using System; - -namespace SimpleSandboxing -{ - public class Worker : MarshalByRefObject - { - static void Main() - { - Worker w = new Worker(); - w.TestIsFullyTrusted(); - - AppDomain adSandbox = GetInternetSandbox(); - w = (Worker) adSandbox.CreateInstanceAndUnwrap( - typeof(Worker).Assembly.FullName, - typeof(Worker).FullName); - w.TestIsFullyTrusted(); - } - - public void TestIsFullyTrusted() - { - AppDomain ad = AppDomain.CurrentDomain; - Console.WriteLine("\r\nApplication domain '{0}': IsFullyTrusted = {1}", - ad.FriendlyName, ad.IsFullyTrusted); - - Console.WriteLine(" IsFullyTrusted = {0} for the current assembly", - typeof(Worker).Assembly.IsFullyTrusted); - - Console.WriteLine(" IsFullyTrusted = {0} for mscorlib", - typeof(int).Assembly.IsFullyTrusted); - } - - // ------------ Helper method --------------------------------------- - static AppDomain GetInternetSandbox() - { - // Create the permission set to grant to all assemblies. - System.Security.Policy.Evidence hostEvidence = new System.Security.Policy.Evidence(); - hostEvidence.AddHostEvidence(new System.Security.Policy.Zone( - System.Security.SecurityZone.Internet)); - System.Security.PermissionSet pset = - System.Security.SecurityManager.GetStandardSandbox(hostEvidence); - - // Identify the folder to use for the sandbox. - AppDomainSetup ads = new AppDomainSetup(); - ads.ApplicationBase = System.IO.Directory.GetCurrentDirectory(); - - // Create the sandboxed application domain. - return AppDomain.CreateDomain("Sandbox", hostEvidence, ads, pset, null); - } - } -} - -/* This example produces output similar to the following: - -Application domain 'Example.exe': IsFullyTrusted = True - IsFullyTrusted = True for the current assembly - IsFullyTrusted = True for mscorlib - -Application domain 'Sandbox': IsFullyTrusted = False - IsFullyTrusted = False for the current assembly - IsFullyTrusted = True for mscorlib - */ -// \ No newline at end of file diff --git a/snippets/csharp/System/AppDomain/Load/Project.csproj b/snippets/csharp/System/AppDomain/Load/Project.csproj deleted file mode 100644 index ffb97e9872d..00000000000 --- a/snippets/csharp/System/AppDomain/Load/Project.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Exe - net10.0 - - - \ No newline at end of file diff --git a/snippets/csharp/System/AppDomain/Load/loadraw.cs b/snippets/csharp/System/AppDomain/Load/loadraw.cs deleted file mode 100644 index a61f25af209..00000000000 --- a/snippets/csharp/System/AppDomain/Load/loadraw.cs +++ /dev/null @@ -1,71 +0,0 @@ -// -using System; -using System.IO; -using System.Reflection; -using System.Reflection.Emit; - -class LoadRawSnippet { - public static void Main() { - AppDomain currentDomain = AppDomain.CurrentDomain; - - InstantiateMyType(currentDomain); // Failed! - - currentDomain.AssemblyResolve += new ResolveEventHandler(MyResolver); - - InstantiateMyType(currentDomain); // OK! - } - - static void InstantiateMyType(AppDomain domain) { - try { - // You must supply a valid fully qualified assembly name here. - domain.CreateInstance("Assembly text name, Version, Culture, PublicKeyToken", "MyType"); - } catch (Exception e) { - Console.WriteLine(e.Message); - } - } - - // Loads the content of a file to a byte array. - static byte[] loadFile(string filename) { - FileStream fs = new FileStream(filename, FileMode.Open); - byte[] buffer = new byte[(int) fs.Length]; - fs.Read(buffer, 0, buffer.Length); - fs.Close(); - - return buffer; - } - - static Assembly MyResolver(object sender, ResolveEventArgs args) { - AppDomain domain = (AppDomain) sender; - - // Once the files are generated, this call is - // actually no longer necessary. - EmitAssembly(domain); - - byte[] rawAssembly = loadFile("temp.dll"); - byte[] rawSymbolStore = loadFile("temp.pdb"); - Assembly assembly = domain.Load(rawAssembly, rawSymbolStore); - - return assembly; - } - - // Creates a dynamic assembly with symbol information - // and saves them to temp.dll and temp.pdb - static void EmitAssembly(AppDomain domain) { - AssemblyName assemblyName = new AssemblyName(); - assemblyName.Name = "MyAssembly"; - - AssemblyBuilder assemblyBuilder = domain.DefineDynamicAssembly(assemblyName, AssemblyBuilderAccess.Save); - ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule("MyModule", "temp.dll", true); - TypeBuilder typeBuilder = moduleBuilder.DefineType("MyType", TypeAttributes.Public); - - ConstructorBuilder constructorBuilder = typeBuilder.DefineConstructor(MethodAttributes.Public, CallingConventions.Standard, null); - ILGenerator ilGenerator = constructorBuilder.GetILGenerator(); - ilGenerator.EmitWriteLine("MyType instantiated!"); - ilGenerator.Emit(OpCodes.Ret); - - typeBuilder.CreateType(); - - assemblyBuilder.Save("temp.dll"); - } -} -// diff --git a/snippets/csharp/System/AppDomain/Load/source.cs b/snippets/csharp/System/AppDomain/Load/source.cs deleted file mode 100644 index aa0d8f1787c..00000000000 --- a/snippets/csharp/System/AppDomain/Load/source.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; - -class AppDomainLoad -{ - public static void Main() - { - try - { -// - AppDomain ad = AppDomain.CreateDomain("ChildDomain"); - ad.Load("MyAssembly"); -// - } - catch (Exception ex) - { - Console.WriteLine(ex.Message); - Console.WriteLine(ex.StackTrace); - } - } -} \ No newline at end of file diff --git a/snippets/csharp/System/AppDomain/Load/source2.cs b/snippets/csharp/System/AppDomain/Load/source2.cs deleted file mode 100644 index 5c016eb7ba5..00000000000 --- a/snippets/csharp/System/AppDomain/Load/source2.cs +++ /dev/null @@ -1,22 +0,0 @@ -// -using System; -using System.Reflection; - -public class Asmload0 -{ - public static void Main() - { - // Use the file name to load the assembly into the current - // application domain. - Assembly a = Assembly.Load("example"); - // Get the type to use. - Type myType = a.GetType("Example"); - // Get the method to call. - MethodInfo myMethod = myType.GetMethod("MethodA"); - // Create an instance. - object obj = Activator.CreateInstance(myType); - // Execute the method. - myMethod.Invoke(obj, null); - } -} -// diff --git a/snippets/csharp/System/AppDomain/Load/source3.cs b/snippets/csharp/System/AppDomain/Load/source3.cs deleted file mode 100644 index 2b239239362..00000000000 --- a/snippets/csharp/System/AppDomain/Load/source3.cs +++ /dev/null @@ -1,29 +0,0 @@ -// -using System; -using System.Reflection; - -class AppDomain2 -{ - public static void Main() - { - Console.WriteLine("Creating new AppDomain."); - AppDomain domain = AppDomain.CreateDomain("MyDomain", null); - - Console.WriteLine("Host domain: " + AppDomain.CurrentDomain.FriendlyName); - Console.WriteLine("child domain: " + domain.FriendlyName); - try - { - AppDomain.Unload(domain); - Console.WriteLine(); - Console.WriteLine("Host domain: " + AppDomain.CurrentDomain.FriendlyName); - // The following statement creates an exception because the domain no longer exists. - Console.WriteLine("child domain: " + domain.FriendlyName); - } - catch (AppDomainUnloadedException e) - { - Console.WriteLine(e.GetType().FullName); - Console.WriteLine("The appdomain MyDomain does not exist."); - } - } -} -// diff --git a/snippets/csharp/System/AppDomain/Overview/AppDomainX.cs b/snippets/csharp/System/AppDomain/Overview/AppDomainX.cs deleted file mode 100644 index 31054aba194..00000000000 --- a/snippets/csharp/System/AppDomain/Overview/AppDomainX.cs +++ /dev/null @@ -1,99 +0,0 @@ -//Types:System.AppDomain,System.AppDomainSetup -// -using System; -using System.Reflection; -using System.Threading; - -// -class Module1 -{ - public static void Main() - { - // Get and display the friendly name of the default AppDomain. - string callingDomainName = Thread.GetDomain().FriendlyName; - Console.WriteLine(callingDomainName); - - // Get and display the full name of the EXE assembly. - string exeAssembly = Assembly.GetEntryAssembly().FullName; - Console.WriteLine(exeAssembly); - - // Construct and initialize settings for a second AppDomain. - AppDomainSetup ads = new AppDomainSetup(); - ads.ApplicationBase = AppDomain.CurrentDomain.BaseDirectory; - - ads.DisallowBindingRedirects = false; - ads.DisallowCodeDownload = true; - ads.ConfigurationFile = - AppDomain.CurrentDomain.SetupInformation.ConfigurationFile; - - // Create the second AppDomain. - AppDomain ad2 = AppDomain.CreateDomain("AD #2", null, ads); - - // Create an instance of MarshalbyRefType in the second AppDomain. - // A proxy to the object is returned. - MarshalByRefType mbrt = - (MarshalByRefType) ad2.CreateInstanceAndUnwrap( - exeAssembly, - typeof(MarshalByRefType).FullName - ); - - // Call a method on the object via the proxy, passing the - // default AppDomain's friendly name in as a parameter. - mbrt.SomeMethod(callingDomainName); - - // Unload the second AppDomain. This deletes its object and - // invalidates the proxy object. - AppDomain.Unload(ad2); - try - { - // Call the method again. Note that this time it fails - // because the second AppDomain was unloaded. - mbrt.SomeMethod(callingDomainName); - Console.WriteLine("Sucessful call."); - } - catch(AppDomainUnloadedException) - { - Console.WriteLine("Failed call; this is expected."); - } - } -} -// - -// -// Because this class is derived from MarshalByRefObject, a proxy -// to a MarshalByRefType object can be returned across an AppDomain -// boundary. -public class MarshalByRefType : MarshalByRefObject -{ - // Call this method via a proxy. - public void SomeMethod(string callingDomainName) - { - // Get this AppDomain's settings and display some of them. - AppDomainSetup ads = AppDomain.CurrentDomain.SetupInformation; - Console.WriteLine("AppName={0}, AppBase={1}, ConfigFile={2}", - ads.ApplicationName, - ads.ApplicationBase, - ads.ConfigurationFile - ); - - // Display the name of the calling AppDomain and the name - // of the second domain. - // NOTE: The application's thread has transitioned between - // AppDomains. - Console.WriteLine("Calling from '{0}' to '{1}'.", - callingDomainName, - Thread.GetDomain().FriendlyName - ); - } -} -// - -/* This code produces output similar to the following: - -AppDomainX.exe -AppDomainX, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null -AppName=, AppBase=C:\AppDomain\bin, ConfigFile=C:\AppDomain\bin\AppDomainX.exe.config -Calling from 'AppDomainX.exe' to 'AD #2'. -Failed call; this is expected. - */ -// diff --git a/snippets/csharp/System/AppDomain/Overview/Project.csproj b/snippets/csharp/System/AppDomain/Overview/Project.csproj deleted file mode 100644 index ffb97e9872d..00000000000 --- a/snippets/csharp/System/AppDomain/Overview/Project.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Exe - net10.0 - - - \ No newline at end of file diff --git a/snippets/csharp/System/AppDomain/ToString/Project.csproj b/snippets/csharp/System/AppDomain/ToString/Project.csproj deleted file mode 100644 index ffb97e9872d..00000000000 --- a/snippets/csharp/System/AppDomain/ToString/Project.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Exe - net10.0 - - - \ No newline at end of file diff --git a/snippets/csharp/System/AppDomain/ToString/adtostring.cs b/snippets/csharp/System/AppDomain/ToString/adtostring.cs deleted file mode 100644 index 9460f86cddb..00000000000 --- a/snippets/csharp/System/AppDomain/ToString/adtostring.cs +++ /dev/null @@ -1,27 +0,0 @@ -// -using System; -using System.Reflection; -using System.Security.Policy; -class ADSetup -{ - public static void Main() - { - // Create application domain setup information - AppDomainSetup domaininfo = new AppDomainSetup(); - - //Create evidence for the new appdomain from evidence of the current application domain - Evidence adevidence = AppDomain.CurrentDomain.Evidence; - - // Create appdomain - AppDomain domain = AppDomain.CreateDomain("MyDomain", adevidence, domaininfo); - - // Write out application domain information - Console.WriteLine("Host domain: " + AppDomain.CurrentDomain.FriendlyName); - Console.WriteLine("child domain: " + domain.FriendlyName); - Console.WriteLine("child domain name using ToString:" + domain.ToString()); - Console.WriteLine(); - - AppDomain.Unload(domain); - } -} -// diff --git a/snippets/csharp/System/AppDomain/TypeResolve/Project.csproj b/snippets/csharp/System/AppDomain/TypeResolve/Project.csproj deleted file mode 100644 index ffb97e9872d..00000000000 --- a/snippets/csharp/System/AppDomain/TypeResolve/Project.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - Exe - net10.0 - - - \ No newline at end of file diff --git a/snippets/csharp/System/AppDomain/TypeResolve/typeresolve.cs b/snippets/csharp/System/AppDomain/TypeResolve/typeresolve.cs deleted file mode 100644 index 7524a27040c..00000000000 --- a/snippets/csharp/System/AppDomain/TypeResolve/typeresolve.cs +++ /dev/null @@ -1,79 +0,0 @@ -// VSWhidbey 445288 -// -using System; -using System.Reflection; -using System.Reflection.Emit; - -class Test -{ - // For this code example, the following information needs to be - // available to both Main and the HandleTypeResolve event - // handler: - private static AssemblyBuilder ab; - private static string moduleName; - - public static void Main() - { - AppDomain currDom = AppDomain.CurrentDomain; - - // Create a dynamic assembly with one module, to be saved to - // disk (AssemblyBuilderAccess.Save). - // - AssemblyName aName = new AssemblyName(); - aName.Name = "Transient"; - moduleName = aName.Name + ".dll"; - ab = currDom.DefineDynamicAssembly(aName, - AssemblyBuilderAccess.Save); - ModuleBuilder mb = ab.DefineDynamicModule(aName.Name, moduleName); - - // The dynamic assembly has just one dummy type, to demonstrate - // type resolution. - TypeBuilder tb = mb.DefineType("Example"); - tb.CreateType(); - - // First, try to load the type without saving the dynamic - // assembly and without hooking up the TypeResolve event. The - // type cannot be loaded. - try - { - Type temp = Type.GetType("Example", true); - Console.WriteLine("Loaded type {0}.", temp); - } - catch (TypeLoadException) - { - Console.WriteLine("Loader could not resolve the type."); - } - - // Hook up the TypeResolve event. - // - currDom.TypeResolve += - new ResolveEventHandler(HandleTypeResolve); - - // Now try to load the type again. The TypeResolve event is - // raised, the dynamic assembly is saved, and the dummy type is - // loaded successfully. Display it to the console, and create - // an instance. - Type t = Type.GetType("Example", true); - Console.WriteLine("Loaded type \"{0}\".", t); - Object o = Activator.CreateInstance(t); - } - - static Assembly HandleTypeResolve(object sender, ResolveEventArgs args) - { - Console.WriteLine("TypeResolve event handler."); - - // Save the dynamic assembly, and then load it using its - // display name. Return the loaded assembly. - // - ab.Save(moduleName); - return Assembly.Load(ab.FullName); - } -} - -/* This code example produces the following output: - -Loader could not resolve the type. -TypeResolve event handler. -Loaded type "Example". - */ -// \ No newline at end of file diff --git a/snippets/csharp/System/AppDomain/Unload/Snippets.csproj b/snippets/csharp/System/AppDomain/Unload/Snippets.csproj deleted file mode 100644 index 10f1ac4e07e..00000000000 --- a/snippets/csharp/System/AppDomain/Unload/Snippets.csproj +++ /dev/null @@ -1,5 +0,0 @@ - - - net10.0 - - \ No newline at end of file diff --git a/snippets/csharp/System/AppDomain/Unload/adunload.cs b/snippets/csharp/System/AppDomain/Unload/adunload.cs deleted file mode 100644 index b53d29a7d5e..00000000000 --- a/snippets/csharp/System/AppDomain/Unload/adunload.cs +++ /dev/null @@ -1,34 +0,0 @@ -// -using System; -using System.Reflection; -using System.Security.Policy; -class ADUnload -{ - public static void Main() - { - - //Create evidence for the new appdomain. - Evidence adevidence = AppDomain.CurrentDomain.Evidence; - - // Create the new application domain. - AppDomain domain = AppDomain.CreateDomain("MyDomain", adevidence); - - Console.WriteLine("Host domain: " + AppDomain.CurrentDomain.FriendlyName); - Console.WriteLine("child domain: " + domain.FriendlyName); - // Unload the application domain. - AppDomain.Unload(domain); - - try - { - Console.WriteLine(); - // Note that the following statement creates an exception because the domain no longer exists. - Console.WriteLine("child domain: " + domain.FriendlyName); - } - - catch (AppDomainUnloadedException e) - { - Console.WriteLine("The appdomain MyDomain does not exist."); - } - } -} -// diff --git a/snippets/fsharp/System/AppDomain/BaseDirectory/adsetup.fs b/snippets/fsharp/System/AppDomain/BaseDirectory/adsetup.fs deleted file mode 100644 index 1be467cb2f0..00000000000 --- a/snippets/fsharp/System/AppDomain/BaseDirectory/adsetup.fs +++ /dev/null @@ -1,29 +0,0 @@ -// -open System -open System.IO - -// Create application domain setup information -let domaininfo = AppDomainSetup() -domaininfo.ConfigurationFile <- Environment.CurrentDirectory + string Path.DirectorySeparatorChar + "ADSetup.exe.config" -domaininfo.ApplicationBase <- Environment.CurrentDirectory - -//Create evidence for the new appdomain from evidence of the current application domain -let adEvidence = AppDomain.CurrentDomain.Evidence - -// Create appdomain -let domain = AppDomain.CreateDomain("Domain2", adEvidence, domaininfo) - -// Display application domain information. -printfn $"Host domain: {AppDomain.CurrentDomain.FriendlyName}" -printfn $"Child domain: {domain.FriendlyName}\n" -printfn $"Configuration file: {domain.SetupInformation.ConfigurationFile}" -printfn $"Application Base Directory: {domain.BaseDirectory}" - -AppDomain.Unload domain -// The example displays output like the following: -// Host domain: adsetup.exe -// Child domain: Domain2 -// -// Configuration file: C:\Test\ADSetup.exe.config -// Application Base Directory: C:\Test -// \ No newline at end of file diff --git a/snippets/fsharp/System/AppDomain/BaseDirectory/fs.fsproj b/snippets/fsharp/System/AppDomain/BaseDirectory/fs.fsproj deleted file mode 100644 index bf55b7f18e6..00000000000 --- a/snippets/fsharp/System/AppDomain/BaseDirectory/fs.fsproj +++ /dev/null @@ -1,10 +0,0 @@ - - - Exe - net48 - - - - - - \ No newline at end of file diff --git a/snippets/fsharp/System/AppDomain/CreateInstanceAndUnwrap/addyno.fs b/snippets/fsharp/System/AppDomain/CreateInstanceAndUnwrap/addyno.fs deleted file mode 100644 index 01e1286ba26..00000000000 --- a/snippets/fsharp/System/AppDomain/CreateInstanceAndUnwrap/addyno.fs +++ /dev/null @@ -1,156 +0,0 @@ -module addyno - -// -open System -open System.IO -open System.Threading -open System.Reflection -open System.Reflection.Emit - -let createADynamicAssembly (myNewDomain: byref) executableNameNoExe = - let executableName = executableNameNoExe + ".exe" - - let myAsmName = AssemblyName() - myAsmName.Name <- executableNameNoExe - myAsmName.CodeBase <- Environment.CurrentDirectory - - let myAsmBuilder = - myNewDomain.DefineDynamicAssembly(myAsmName, AssemblyBuilderAccess.RunAndSave) - printfn "-- Dynamic Assembly instantiated." - - let myModBuilder = - myAsmBuilder.DefineDynamicModule(executableNameNoExe, executableName) - - let myTypeBuilder = - myModBuilder.DefineType(executableNameNoExe, - TypeAttributes.Public, - typeof) - - let myFCMethod = - myTypeBuilder.DefineMethod("CountLocalFiles", - MethodAttributes.Public ||| - MethodAttributes.Static, - null, - [||]) - - let currentDirGetMI = typeof.GetProperty("CurrentDirectory").GetGetMethod() - let writeLine0objMI = typeof.GetMethod("WriteLine", [| typeof |]) - let writeLine2objMI = typeof.GetMethod("WriteLine", [| typeof; typeof; typeof |]) - let getFilesMI = typeof.GetMethod("GetFiles", [| typeof |]) - - myFCMethod.InitLocals <- true - - let myFCIL = myFCMethod.GetILGenerator() - - printfn "-- Generating MSIL method body..." - let v0 = myFCIL.DeclareLocal typeof - let v1 = myFCIL.DeclareLocal typeof - let v2 = myFCIL.DeclareLocal typeof - let v3 = myFCIL.DeclareLocal typeof - - let evalForEachLabel = myFCIL.DefineLabel() - let topOfForEachLabel = myFCIL.DefineLabel() - - // Build the method body. - - myFCIL.EmitCall(OpCodes.Call, currentDirGetMI, null) - myFCIL.Emit(OpCodes.Stloc_S, v0) - myFCIL.Emit(OpCodes.Ldc_I4_0) - myFCIL.Emit(OpCodes.Stloc_S, v1) - myFCIL.Emit(OpCodes.Ldstr, "---") - myFCIL.EmitCall(OpCodes.Call, writeLine0objMI, null) - myFCIL.Emit(OpCodes.Ldloc_S, v0) - myFCIL.EmitCall(OpCodes.Call, getFilesMI, null) - myFCIL.Emit(OpCodes.Stloc_S, v3) - - myFCIL.Emit(OpCodes.Br_S, evalForEachLabel) - - // foreach loop starts here. - myFCIL.MarkLabel topOfForEachLabel - - // Load array of strings and index, store value at index for output. - myFCIL.Emit(OpCodes.Ldloc_S, v3) - myFCIL.Emit(OpCodes.Ldloc_S, v1) - myFCIL.Emit OpCodes.Ldelem_Ref - myFCIL.Emit(OpCodes.Stloc_S, v2) - - myFCIL.Emit(OpCodes.Ldloc_S, v2) - myFCIL.EmitCall(OpCodes.Call, writeLine0objMI, null) - - // Increment counter by one. - myFCIL.Emit(OpCodes.Ldloc_S, v1) - myFCIL.Emit(OpCodes.Ldc_I4_1) - myFCIL.Emit OpCodes.Add - myFCIL.Emit(OpCodes.Stloc_S, v1) - - // Determine if end of file list array has been reached. - myFCIL.MarkLabel evalForEachLabel - myFCIL.Emit(OpCodes.Ldloc_S, v1) - myFCIL.Emit(OpCodes.Ldloc_S, v3) - myFCIL.Emit OpCodes.Ldlen - myFCIL.Emit OpCodes.Conv_I4 - myFCIL.Emit(OpCodes.Blt_S, topOfForEachLabel) - //foreach loop end here. - - myFCIL.Emit(OpCodes.Ldstr, "---") - myFCIL.EmitCall(OpCodes.Call, writeLine0objMI, null) - myFCIL.Emit(OpCodes.Ldstr, "There are {0} files in {1}.") - myFCIL.Emit(OpCodes.Ldloc_S, v1) - myFCIL.Emit(OpCodes.Box, typeof) - myFCIL.Emit(OpCodes.Ldloc_S, v0) - myFCIL.EmitCall(OpCodes.Call, writeLine2objMI, null) - - myFCIL.Emit OpCodes.Ret - - let myType = myTypeBuilder.CreateType() - - myAsmBuilder.SetEntryPoint myFCMethod - myAsmBuilder.Save executableName - printfn "-- Method generated, type completed, and assembly saved to disk." - - myType - - -printf "Enter a name for the file counting assembly: " -let executableNameNoExe = stdin.ReadLine() -let executableName = executableNameNoExe + ".exe" -printfn "---" - -let domainDir = Environment.CurrentDirectory - -let mutable curDomain = Thread.GetDomain() - -// Create a new AppDomain, with the current directory as the base. - -printfn $"Current Directory: {Environment.CurrentDirectory}" -let mySetupInfo = AppDomainSetup() -mySetupInfo.ApplicationBase <- domainDir -mySetupInfo.ApplicationName <- executableNameNoExe -mySetupInfo.LoaderOptimization <- LoaderOptimization.SingleDomain - -let myDomain = - AppDomain.CreateDomain(executableNameNoExe, null, mySetupInfo) - -printfn $"Creating a new AppDomain '{executableNameNoExe}'..." - -printfn $"-- Base Directory = '{myDomain.BaseDirectory}'" -printfn $"-- Shadow Copy? = '{myDomain.ShadowCopyFiles}'" - -printfn "---" -let myFCType = - createADynamicAssembly &curDomain executableNameNoExe - -printfn $"Loading '{executableName}' from '{myDomain.BaseDirectory}'..." - -let bFlags = - BindingFlags.Public ||| BindingFlags.CreateInstance ||| BindingFlags.Instance - -let myObjInstance = - myDomain.CreateInstanceAndUnwrap(executableNameNoExe, - executableNameNoExe, false, bFlags, - null, null, null, null, null) - -printfn $"Executing method 'CountLocalFiles' in {myObjInstance}..." - -myFCType.InvokeMember("CountLocalFiles", BindingFlags.InvokeMethod, null, myObjInstance, [||]) -// \ No newline at end of file diff --git a/snippets/fsharp/System/AppDomain/CreateInstanceAndUnwrap/fs.fsproj b/snippets/fsharp/System/AppDomain/CreateInstanceAndUnwrap/fs.fsproj deleted file mode 100644 index 273b31df9f0..00000000000 --- a/snippets/fsharp/System/AppDomain/CreateInstanceAndUnwrap/fs.fsproj +++ /dev/null @@ -1,12 +0,0 @@ - - - Exe - net48 - - - - - - - - \ No newline at end of file diff --git a/snippets/fsharp/System/AppDomain/CreateInstanceAndUnwrap/ignorecase.fs b/snippets/fsharp/System/AppDomain/CreateInstanceAndUnwrap/ignorecase.fs deleted file mode 100644 index b4b416d2e95..00000000000 --- a/snippets/fsharp/System/AppDomain/CreateInstanceAndUnwrap/ignorecase.fs +++ /dev/null @@ -1,27 +0,0 @@ -module ignorecase - -// -open System -open System.Reflection - - -let instantiateINT32 ignoreCase = - try - let currentDomain = AppDomain.CurrentDomain - let instance = currentDomain.CreateInstanceAndUnwrap( - "mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", - "SYSTEM.INT32", - ignoreCase, - BindingFlags.Default, - null, - null, - null, - null, - null) - printfn $"{instance.GetType()}" - with :? TypeLoadException as e -> - printfn $"{e.Message}" - -instantiateINT32 false // Failed! -instantiateINT32 true // OK! -// \ No newline at end of file diff --git a/snippets/fsharp/System/AppDomain/CreateInstanceAndUnwrap/source.fs b/snippets/fsharp/System/AppDomain/CreateInstanceAndUnwrap/source.fs deleted file mode 100644 index c7366f86b3e..00000000000 --- a/snippets/fsharp/System/AppDomain/CreateInstanceAndUnwrap/source.fs +++ /dev/null @@ -1,27 +0,0 @@ -module source - -// -open System -open System.Reflection - -type Worker() = - inherit MarshalByRefObject() - member _.PrintDomain() = - printfn $"Object is executing in AppDomain \"{AppDomain.CurrentDomain.FriendlyName}\"" - -// Create an ordinary instance in the current AppDomain -let localWorker = Worker() -localWorker.PrintDomain() - -// Create a new application domain, create an instance -// of Worker in the application domain, and execute code -// there. -let ad = AppDomain.CreateDomain "New domain" -let remoteWorker = - ad.CreateInstanceAndUnwrap(typeof.Assembly.FullName, "Worker") :?> Worker -remoteWorker.PrintDomain() - -// This code produces output similar to the following: -// Object is executing in AppDomain "source.exe" -// Object is executing in AppDomain "New domain" -// \ No newline at end of file diff --git a/snippets/fsharp/System/AppDomain/CurrentDomain/adapplicationbase.fs b/snippets/fsharp/System/AppDomain/CurrentDomain/adapplicationbase.fs deleted file mode 100644 index 5b6efde9c51..00000000000 --- a/snippets/fsharp/System/AppDomain/CurrentDomain/adapplicationbase.fs +++ /dev/null @@ -1,24 +0,0 @@ -// -open System - -let root = AppDomain.CurrentDomain - -let setup = AppDomainSetup() -setup.ApplicationBase <- - root.SetupInformation.ApplicationBase + @"MyAppSubfolder\" - -let domain = AppDomain.CreateDomain("MyDomain", null, setup) - -printfn $"Application base of {root.FriendlyName}:\r\n\t{root.SetupInformation.ApplicationBase}" -printfn $"Application base of {domain.FriendlyName}:\r\n\t{domain.SetupInformation.ApplicationBase}" - -AppDomain.Unload domain - -(* This example produces output similar to the following: - -Application base of MyApp.exe: - C:\Program Files\MyApp\ -Application base of MyDomain: - C:\Program Files\MyApp\MyAppSubfolder\ - *) -// \ No newline at end of file diff --git a/snippets/fsharp/System/AppDomain/CurrentDomain/fs.fsproj b/snippets/fsharp/System/AppDomain/CurrentDomain/fs.fsproj deleted file mode 100644 index aff94bd0b7f..00000000000 --- a/snippets/fsharp/System/AppDomain/CurrentDomain/fs.fsproj +++ /dev/null @@ -1,10 +0,0 @@ - - - Exe - net48 - - - - - - \ No newline at end of file diff --git a/snippets/fsharp/System/AppDomain/DynamicDirectory/addynamicbase.fs b/snippets/fsharp/System/AppDomain/DynamicDirectory/addynamicbase.fs deleted file mode 100644 index a9511197460..00000000000 --- a/snippets/fsharp/System/AppDomain/DynamicDirectory/addynamicbase.fs +++ /dev/null @@ -1,92 +0,0 @@ -// -open System -open System.Reflection -open System.Reflection.Emit - -type Example() = - inherit MarshalByRefObject() - member _.Test() = - let dynAssem = - Assembly.Load "DynamicHelloWorld, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" - - let myType = dynAssem.GetType "HelloWorld" - myType.InvokeMember("HelloFromAD", BindingFlags.Public ||| - BindingFlags.Static ||| BindingFlags.InvokeMethod, - Type.DefaultBinder, null, null) - |> ignore - - static member GenerateDynamicAssembly(location: string) = - // Define the dynamic assembly and the module. There is only one - // module in this assembly. Note that the call to DefineDynamicAssembly - // specifies the location where the assembly will be saved. The - // assembly version is 1.0.0.0. - let asmName = AssemblyName "DynamicHelloWorld" - asmName.Version <- Version "1.0.0.0" - - let ab = AppDomain.CurrentDomain.DefineDynamicAssembly(asmName, AssemblyBuilderAccess.Save, location) - - let moduleName = asmName.Name + ".exe" - let mb = ab.DefineDynamicModule(asmName.Name, moduleName) - - // Define the "HelloWorld" type, with one static method. - let tb = mb.DefineType("HelloWorld", TypeAttributes.Public) - let hello = - tb.DefineMethod("HelloFromAD", MethodAttributes.Public ||| MethodAttributes.Static, null, null) - - // The method displays a message that contains the name of the application - // domain where the method is executed. - let il = hello.GetILGenerator() - il.Emit(OpCodes.Ldstr, "Hello from '{0}'!") - il.Emit(OpCodes.Call, typeof.GetProperty("CurrentDomain").GetGetMethod()) - il.Emit(OpCodes.Call, typeof.GetProperty("FriendlyName").GetGetMethod()) - il.Emit(OpCodes.Call, typeof.GetMethod("WriteLine", [| typeof; typeof |])) - il.Emit OpCodes.Ret - - // Complete the HelloWorld type and save the assembly. The assembly - // is placed in the location specified by DefineDynamicAssembly. - let myType = tb.CreateType() - ab.Save moduleName - -// Prepare to create a new application domain. -let setup = AppDomainSetup() - -// Set the application name before setting the dynamic base. -setup.ApplicationName <- "Example" - -// Set the location of the base directory where assembly resolution -// probes for dynamic assemblies. Note that the hash code of the -// application name is concatenated to the base directory name you -// supply. -setup.DynamicBase <- "C:\\DynamicAssemblyDir" -printfn $"DynamicBase is set to '{setup.DynamicBase}'." - -let ad = AppDomain.CreateDomain("MyDomain", null, setup) - -// The dynamic directory name is the dynamic base concatenated with -// the application name: \\ -let dynamicDir = ad.DynamicDirectory -printfn $"Dynamic directory is '{dynamicDir}'." - -// The AssemblyBuilder won't create this directory automatically. -if not (System.IO.Directory.Exists dynamicDir) then - printfn "Creating the dynamic directory." - System.IO.Directory.CreateDirectory dynamicDir - |> ignore - -// Generate a dynamic assembly and store it in the dynamic -// directory. -Example.GenerateDynamicAssembly dynamicDir - -// Create an instance of the Example class in the application domain, -// and call its Test method to load the dynamic assembly and use it. -let ex = ad.CreateInstanceAndUnwrap(typeof.Assembly.FullName, "Example") :?> Example -ex.Test() - -(* This example produces output similar to the following: - -DynamicBase is set to 'C:\DynamicAssemblyDir\5e4a7545'. -Dynamic directory is 'C:\DynamicAssemblyDir\5e4a7545\Example'. -Creating the dynamic directory. -Hello from 'MyDomain'! - *) -// diff --git a/snippets/fsharp/System/AppDomain/GetAssemblies/adgetassemblies.fs b/snippets/fsharp/System/AppDomain/GetAssemblies/adgetassemblies.fs deleted file mode 100644 index 015cffd435f..00000000000 --- a/snippets/fsharp/System/AppDomain/GetAssemblies/adgetassemblies.fs +++ /dev/null @@ -1,19 +0,0 @@ -// -open System - -let currentDomain = AppDomain.CurrentDomain -//Provide the current application domain evidence for the assembly. -let asEvidence = currentDomain.Evidence -//Load the assembly from the application directory using a simple name. - -//Create an assembly called CustomLibrary to run this sample. -currentDomain.Load("CustomLibrary", asEvidence) - -//Make an array for the list of assemblies. -let assems = currentDomain.GetAssemblies() - -//List the assemblies in the current application domain. -printfn "List of assemblies loaded in current appdomain:" -for assem in assems do - printfn $"{assem}" -// \ No newline at end of file diff --git a/snippets/fsharp/System/AppDomain/GetAssemblies/fs.fsproj b/snippets/fsharp/System/AppDomain/GetAssemblies/fs.fsproj deleted file mode 100644 index d11dd7611e0..00000000000 --- a/snippets/fsharp/System/AppDomain/GetAssemblies/fs.fsproj +++ /dev/null @@ -1,10 +0,0 @@ - - - Exe - net48 - - - - - - \ No newline at end of file diff --git a/snippets/fsharp/System/AppDomain/Id/fs.fsproj b/snippets/fsharp/System/AppDomain/Id/fs.fsproj deleted file mode 100644 index 304d2fa939e..00000000000 --- a/snippets/fsharp/System/AppDomain/Id/fs.fsproj +++ /dev/null @@ -1,10 +0,0 @@ - - - Exe - net48 - - - - - - \ No newline at end of file diff --git a/snippets/fsharp/System/AppDomain/Id/source.fs b/snippets/fsharp/System/AppDomain/Id/source.fs deleted file mode 100644 index e48ed536b67..00000000000 --- a/snippets/fsharp/System/AppDomain/Id/source.fs +++ /dev/null @@ -1,25 +0,0 @@ -// -open System - -// This method has the same signature as the CrossAppDomainDelegate, -// so that it can be executed easily in the new application domain. -let showDomainInfo () = - let ad = AppDomain.CurrentDomain - printfn $"\nFriendlyName: {ad.FriendlyName}" - printfn $"Id: {ad.Id}" - printfn $"IsDefaultAppDomain: {ad.IsDefaultAppDomain()}" - -// The following attribute indicates to the loader that assemblies -// in the global assembly cache should be shared across multiple -// application domains. -[] -[] -let main _ = - // Show information for the default application domain. - showDomainInfo () - - // Create a new application domain and display its information. - let newDomain = AppDomain.CreateDomain "MyMultiDomain" - newDomain.DoCallBack(CrossAppDomainDelegate showDomainInfo) - 0 -// \ No newline at end of file diff --git a/snippets/fsharp/System/AppDomain/Load/fs.fsproj b/snippets/fsharp/System/AppDomain/Load/fs.fsproj deleted file mode 100644 index e1045d7ad96..00000000000 --- a/snippets/fsharp/System/AppDomain/Load/fs.fsproj +++ /dev/null @@ -1,11 +0,0 @@ - - - Exe - net48 - - - - - - - \ No newline at end of file diff --git a/snippets/fsharp/System/AppDomain/Load/loadraw.fs b/snippets/fsharp/System/AppDomain/Load/loadraw.fs deleted file mode 100644 index 62fc00aa06d..00000000000 --- a/snippets/fsharp/System/AppDomain/Load/loadraw.fs +++ /dev/null @@ -1,62 +0,0 @@ -module loadraw - -// -open System -open System.IO -open System.Reflection -open System.Reflection.Emit - -let instantiateMyType (domain: AppDomain) = - try - // You must supply a valid fully qualified assembly name here. - domain.CreateInstance("Assembly text name, Version, Culture, PublicKeyToken", "MyType") - |> ignore - with e -> - printfn $"{e.Message}" - -// Loads the content of a file to a byte array. -let loadFile filename = - use fs = new FileStream(filename, FileMode.Open) - let buffer = Array.zeroCreate (int fs.Length) - fs.Read(buffer, 0, buffer.Length) |> ignore - fs.Close() - buffer - -// Creates a dynamic assembly with symbol information -// and saves them to temp.dll and temp.pdb -let emitAssembly (domain: AppDomain) = - let assemblyName = AssemblyName() - assemblyName.Name <- "MyAssembly" - - let assemblyBuilder = domain.DefineDynamicAssembly(assemblyName, AssemblyBuilderAccess.Save) - let moduleBuilder = assemblyBuilder.DefineDynamicModule("MyModule", "temp.dll", true) - let typeBuilder = moduleBuilder.DefineType("MyType", TypeAttributes.Public) - - let constructorBuilder = typeBuilder.DefineConstructor(MethodAttributes.Public, CallingConventions.Standard, null) - let ilGenerator = constructorBuilder.GetILGenerator() - ilGenerator.EmitWriteLine "MyType instantiated!" - ilGenerator.Emit OpCodes.Ret - - typeBuilder.CreateType() |> ignore - - assemblyBuilder.Save "temp.dll" - -let myResolver (sender: obj) (args: ResolveEventArgs) = - let domain = sender :?> AppDomain - - // Once the files are generated, this call is - // actually no longer necessary. - emitAssembly domain - - let rawAssembly = loadFile "temp.dll" - let rawSymbolStore = loadFile "temp.pdb" - domain.Load(rawAssembly, rawSymbolStore) - -let currentDomain = AppDomain.CurrentDomain - -instantiateMyType currentDomain // Failed! - -currentDomain.add_AssemblyResolve (ResolveEventHandler myResolver) - -instantiateMyType currentDomain // OK! -// \ No newline at end of file diff --git a/snippets/fsharp/System/AppDomain/Load/source.fs b/snippets/fsharp/System/AppDomain/Load/source.fs deleted file mode 100644 index f809c2882fd..00000000000 --- a/snippets/fsharp/System/AppDomain/Load/source.fs +++ /dev/null @@ -1,6 +0,0 @@ -open System -// -let ad = AppDomain.CreateDomain "ChildDomain" -ad.Load "MyAssembly" -// -|> ignore \ No newline at end of file diff --git a/snippets/fsharp/System/AppDomain/ToString/adtostring.fs b/snippets/fsharp/System/AppDomain/ToString/adtostring.fs deleted file mode 100644 index 15b25570f7c..00000000000 --- a/snippets/fsharp/System/AppDomain/ToString/adtostring.fs +++ /dev/null @@ -1,19 +0,0 @@ -// -open System - -// Create application domain setup information -let domaininfo = AppDomainSetup() - -//Create evidence for the new appdomain from evidence of the current application domain -let adevidence = AppDomain.CurrentDomain.Evidence - -// Create appdomain -let domain = AppDomain.CreateDomain("MyDomain", adevidence, domaininfo) - -// Write out application domain information -printfn $"Host domain: {AppDomain.CurrentDomain.FriendlyName}" -printfn $"child domain: {domain.FriendlyName}" -printfn $"child domain name using ToString:{domain}\n" - -AppDomain.Unload domain -// \ No newline at end of file diff --git a/snippets/fsharp/System/AppDomain/ToString/fs.fsproj b/snippets/fsharp/System/AppDomain/ToString/fs.fsproj deleted file mode 100644 index 086a99d18ea..00000000000 --- a/snippets/fsharp/System/AppDomain/ToString/fs.fsproj +++ /dev/null @@ -1,10 +0,0 @@ - - - Exe - net48 - - - - - - \ No newline at end of file diff --git a/snippets/fsharp/System/AppDomain/TypeResolve/fs.fsproj b/snippets/fsharp/System/AppDomain/TypeResolve/fs.fsproj deleted file mode 100644 index d9ff98ae4d5..00000000000 --- a/snippets/fsharp/System/AppDomain/TypeResolve/fs.fsproj +++ /dev/null @@ -1,10 +0,0 @@ - - - Exe - net48 - - - - - - \ No newline at end of file diff --git a/snippets/fsharp/System/AppDomain/TypeResolve/typeresolve.fs b/snippets/fsharp/System/AppDomain/TypeResolve/typeresolve.fs deleted file mode 100644 index 06b9dd066f2..00000000000 --- a/snippets/fsharp/System/AppDomain/TypeResolve/typeresolve.fs +++ /dev/null @@ -1,58 +0,0 @@ -// -open System -open System.Reflection -open System.Reflection.Emit - -let currDom = AppDomain.CurrentDomain - -// Create a dynamic assembly with one module, to be saved to -// disk (AssemblyBuilderAccess.Save). -// -let aName = AssemblyName() -aName.Name <- "Transient" -let moduleName = aName.Name + ".dll" -let ab = currDom.DefineDynamicAssembly(aName, AssemblyBuilderAccess.Save) - -let handleTypeResolve _ _ = - printfn "TypeResolve event handler." - - // Save the dynamic assembly, and then load it using its - // display name. Return the loaded assembly. - ab.Save moduleName - Assembly.Load ab.FullName - -let mb = ab.DefineDynamicModule(aName.Name, moduleName) - -// The dynamic assembly has just one dummy type, to demonstrate -// type resolution. -let tb = mb.DefineType "Example" -tb.CreateType() |> ignore - -// First, try to load the type without saving the dynamic -// assembly and without hooking up the TypeResolve event. The -// type cannot be loaded. -try - let temp = Type.GetType("Example", true) - printfn $"Loaded type {temp}." -with :? TypeLoadException -> - printfn "Loader could not resolve the type." - -// Hook up the TypeResolve event. -// -currDom.add_TypeResolve(ResolveEventHandler handleTypeResolve) - -// Now try to load the type again. The TypeResolve event is -// raised, the dynamic assembly is saved, and the dummy type is -// loaded successfully. Display it to the console, and create -// an instance. -let t = Type.GetType("Example", true) -printfn $"Loaded type \"{t}\"." -let o = Activator.CreateInstance t - -(* This code example produces the following output: - -Loader could not resolve the type. -TypeResolve event handler. -Loaded type "Example". - *) -// \ No newline at end of file diff --git a/snippets/visualbasic/System/AppDomain/BaseDirectory/adsetup.vb b/snippets/visualbasic/System/AppDomain/BaseDirectory/adsetup.vb deleted file mode 100644 index 97a66ce5342..00000000000 --- a/snippets/visualbasic/System/AppDomain/BaseDirectory/adsetup.vb +++ /dev/null @@ -1,36 +0,0 @@ -' -Imports System.IO -Imports System.Reflection -Imports System.Security.Policy - -Module Example - Public Sub Main() - ' Create the application domain setup information. - Dim domaininfo As New AppDomainSetup() - domaininfo.ConfigurationFile = Path.Combine(Environment.CurrentDirectory, "ADSetup.exe.config") - domaininfo.ApplicationBase = Environment.CurrentDirectory - - 'Create evidence for the new appdomain from evidence of the current application domain. - Dim adEvidence As Evidence = AppDomain.CurrentDomain.Evidence - - ' Create appdomain. - Dim domain As AppDomain = AppDomain.CreateDomain("Domain2", adevidence, domaininfo) - - ' Display the application domain information. - Console.WriteLine(("Host domain: " + AppDomain.CurrentDomain.FriendlyName)) - Console.WriteLine(("Child domain: " + domain.FriendlyName)) - Console.WriteLine() - Console.WriteLine(("Configuration file: " + domain.SetupInformation.ConfigurationFile)) - Console.WriteLine(("Application Base Directory: " + domain.BaseDirectory)) - - AppDomain.Unload(domain) - End Sub -End Module -' The example displays output like the following: -' Host domain: adsetup.exe -' Child domain: Domain2 -' -' Configuration file: C:\Test\ADSetup.exe.config -' Application Base Directory: C:\Test -' - diff --git a/snippets/visualbasic/System/AppDomain/CreateInstanceAndUnwrap/addyno.vb b/snippets/visualbasic/System/AppDomain/CreateInstanceAndUnwrap/addyno.vb deleted file mode 100644 index da790f55d90..00000000000 --- a/snippets/visualbasic/System/AppDomain/CreateInstanceAndUnwrap/addyno.vb +++ /dev/null @@ -1,155 +0,0 @@ - ' -Imports System.IO -Imports System.Threading -Imports System.Reflection -Imports System.Reflection.Emit -Imports System.Runtime.Remoting - - - -Class ADDyno - - - - Public Shared Function CreateADynamicAssembly(ByRef myNewDomain As AppDomain, executableNameNoExe As String) As Type - - Dim executableName As String = executableNameNoExe + ".exe" - - Dim myAsmName As New AssemblyName() - myAsmName.Name = executableNameNoExe - myAsmName.CodeBase = Environment.CurrentDirectory - - Dim myAsmBuilder As AssemblyBuilder = myNewDomain.DefineDynamicAssembly(myAsmName, AssemblyBuilderAccess.RunAndSave) - Console.WriteLine("-- Dynamic Assembly instantiated.") - - Dim myModBuilder As ModuleBuilder = myAsmBuilder.DefineDynamicModule(executableNameNoExe, executableName) - - Dim myTypeBuilder As TypeBuilder = myModBuilder.DefineType(executableNameNoExe, TypeAttributes.Public, GetType(MarshalByRefObject)) - - Dim myFCMethod As MethodBuilder = myTypeBuilder.DefineMethod("CountLocalFiles", MethodAttributes.Public Or MethodAttributes.Static, Nothing, New Type() {}) - - Dim currentDirGetMI As MethodInfo = GetType(Environment).GetProperty("CurrentDirectory").GetGetMethod() - Dim writeLine0objMI As MethodInfo = GetType(Console).GetMethod("WriteLine", New Type() {GetType(String)}) - Dim writeLine2objMI As MethodInfo = GetType(Console).GetMethod("WriteLine", New Type() {GetType(String), GetType(Object), GetType(Object)}) - Dim getFilesMI As MethodInfo = GetType(Directory).GetMethod("GetFiles", New Type() {GetType(String)}) - - myFCMethod.InitLocals = True - - Dim myFCIL As ILGenerator = myFCMethod.GetILGenerator() - - Console.WriteLine("-- Generating MSIL method body...") - Dim v0 As LocalBuilder = myFCIL.DeclareLocal(GetType(String)) - Dim v1 As LocalBuilder = myFCIL.DeclareLocal(GetType(Integer)) - Dim v2 As LocalBuilder = myFCIL.DeclareLocal(GetType(String)) - Dim v3 As LocalBuilder = myFCIL.DeclareLocal(GetType(String())) - - Dim evalForEachLabel As Label = myFCIL.DefineLabel() - Dim topOfForEachLabel As Label = myFCIL.DefineLabel() - - ' Build the method body. - myFCIL.EmitCall(OpCodes.Call, currentDirGetMI, Nothing) - myFCIL.Emit(OpCodes.Stloc_S, v0) - myFCIL.Emit(OpCodes.Ldc_I4_0) - myFCIL.Emit(OpCodes.Stloc_S, v1) - myFCIL.Emit(OpCodes.Ldstr, "---") - myFCIL.EmitCall(OpCodes.Call, writeLine0objMI, Nothing) - myFCIL.Emit(OpCodes.Ldloc_S, v0) - myFCIL.EmitCall(OpCodes.Call, getFilesMI, Nothing) - myFCIL.Emit(OpCodes.Stloc_S, v3) - - myFCIL.Emit(OpCodes.Br_S, evalForEachLabel) - - ' foreach loop starts here. - myFCIL.MarkLabel(topOfForEachLabel) - - ' Load array of strings and index, store value at index for output. - myFCIL.Emit(OpCodes.Ldloc_S, v3) - myFCIL.Emit(OpCodes.Ldloc_S, v1) - myFCIL.Emit(OpCodes.Ldelem_Ref) - myFCIL.Emit(OpCodes.Stloc_S, v2) - - myFCIL.Emit(OpCodes.Ldloc_S, v2) - myFCIL.EmitCall(OpCodes.Call, writeLine0objMI, Nothing) - - ' Increment counter by one. - myFCIL.Emit(OpCodes.Ldloc_S, v1) - myFCIL.Emit(OpCodes.Ldc_I4_1) - myFCIL.Emit(OpCodes.Add) - myFCIL.Emit(OpCodes.Stloc_S, v1) - - ' Determine if end of file list array has been reached. - myFCIL.MarkLabel(evalForEachLabel) - myFCIL.Emit(OpCodes.Ldloc_S, v1) - myFCIL.Emit(OpCodes.Ldloc_S, v3) - myFCIL.Emit(OpCodes.Ldlen) - myFCIL.Emit(OpCodes.Conv_I4) - myFCIL.Emit(OpCodes.Blt_S, topOfForEachLabel) - 'foreach loop end here. - myFCIL.Emit(OpCodes.Ldstr, "---") - myFCIL.EmitCall(OpCodes.Call, writeLine0objMI, Nothing) - myFCIL.Emit(OpCodes.Ldstr, "There are {0} files in {1}.") - myFCIL.Emit(OpCodes.Ldloc_S, v1) - myFCIL.Emit(OpCodes.Box, GetType(Integer)) - myFCIL.Emit(OpCodes.Ldloc_S, v0) - myFCIL.EmitCall(OpCodes.Call, writeLine2objMI, Nothing) - - myFCIL.Emit(OpCodes.Ret) - - Dim myType As Type = myTypeBuilder.CreateType() - - myAsmBuilder.SetEntryPoint(myFCMethod) - myAsmBuilder.Save(executableName) - Console.WriteLine("-- Method generated, type completed, and assembly saved to disk.") - - Return myType - End Function 'CreateADynamicAssembly - - - Public Shared Sub Main() - - Dim executableName As String = Nothing - Dim domainDir As String - - Console.Write("Enter a name for the file counting assembly: ") - Dim executableNameNoExe As String = Console.ReadLine() - executableName = executableNameNoExe + ".exe" - Console.WriteLine("---") - - domainDir = Environment.CurrentDirectory - - Dim curDomain As AppDomain = Thread.GetDomain() - - - ' Create a new AppDomain, with the current directory as the base. - Console.WriteLine("Current Directory: {0}", Environment.CurrentDirectory) - Dim mySetupInfo As New AppDomainSetup() - mySetupInfo.ApplicationBase = domainDir - mySetupInfo.ApplicationName = executableNameNoExe - mySetupInfo.LoaderOptimization = LoaderOptimization.SingleDomain - - Dim myDomain As AppDomain = AppDomain.CreateDomain(executableNameNoExe, Nothing, mySetupInfo) - - Console.WriteLine("Creating a new AppDomain '{0}'...", executableNameNoExe) - - Console.WriteLine("-- Base Directory = '{0}'", myDomain.BaseDirectory) - Console.WriteLine("-- Shadow Copy? = '{0}'", myDomain.ShadowCopyFiles) - - Console.WriteLine("---") - Dim myFCType As Type = CreateADynamicAssembly(curDomain, executableNameNoExe) - - Console.WriteLine("Loading '{0}' from '{1}'...", executableName, myDomain.BaseDirectory.ToString()) - - - Dim bFlags As BindingFlags = BindingFlags.Public Or BindingFlags.CreateInstance Or BindingFlags.Instance - - Dim myObjInstance As [Object] = myDomain.CreateInstanceAndUnwrap(executableNameNoExe, executableNameNoExe, False, bFlags, Nothing, Nothing, Nothing, Nothing, Nothing) - - Console.WriteLine("Executing method 'CountLocalFiles' in {0}...", myObjInstance.ToString()) - - myFCType.InvokeMember("CountLocalFiles", BindingFlags.InvokeMethod, Nothing, myObjInstance, New Object() {}) - End Sub -End Class - - - -' \ No newline at end of file diff --git a/snippets/visualbasic/System/AppDomain/CreateInstanceAndUnwrap/ignorecase.vb b/snippets/visualbasic/System/AppDomain/CreateInstanceAndUnwrap/ignorecase.vb deleted file mode 100644 index 9bd10bcd090..00000000000 --- a/snippets/visualbasic/System/AppDomain/CreateInstanceAndUnwrap/ignorecase.vb +++ /dev/null @@ -1,35 +0,0 @@ -Option Strict On -Option Explicit On - -' -Imports System.Reflection - -Module Test - - Sub Main() - InstantiateINT32(False) ' Failed! - InstantiateINT32(True) ' OK! - End Sub - - Sub InstantiateINT32(ignoreCase As Boolean) - Try - Dim currentDomain As AppDomain = AppDomain.CurrentDomain - Dim instance As Object = currentDomain.CreateInstanceAndUnwrap( _ - "mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", _ - "SYSTEM.INT32", _ - ignoreCase, _ - BindingFlags.Default, _ - Nothing, _ - Nothing, _ - Nothing, _ - Nothing, _ - Nothing _ - ) - Console.WriteLine(instance.GetType()) - Catch e As TypeLoadException - Console.WriteLine(e.Message) - End Try - End Sub - -End Module 'Test -' \ No newline at end of file diff --git a/snippets/visualbasic/System/AppDomain/CreateInstanceAndUnwrap/source.vb b/snippets/visualbasic/System/AppDomain/CreateInstanceAndUnwrap/source.vb deleted file mode 100644 index d65e9b25943..00000000000 --- a/snippets/visualbasic/System/AppDomain/CreateInstanceAndUnwrap/source.vb +++ /dev/null @@ -1,38 +0,0 @@ -' -Imports System.Reflection - -Public Class Worker - Inherits MarshalByRefObject - - Public Sub PrintDomain() - Console.WriteLine("Object is executing in AppDomain ""{0}""", _ - AppDomain.CurrentDomain.FriendlyName) - End Sub -End Class - -Class Example - - Public Shared Sub Main() - ' Create an ordinary instance in the current AppDomain - Dim localWorker As New Worker() - localWorker.PrintDomain() - - ' Create a new application domain, create an instance - ' of Worker in the application domain, and execute code - ' there. - Dim ad As AppDomain = AppDomain.CreateDomain("New domain") - Dim remoteWorker As Worker = CType( _ - ad.CreateInstanceAndUnwrap( _ - GetType(Worker).Assembly.FullName, _ - "Worker"), _ - Worker) - remoteWorker.PrintDomain() - - End Sub -End Class - -' This code produces output similar to the following: -' -'Object is executing in AppDomain "source.exe" -'Object is executing in AppDomain "New domain" -' \ No newline at end of file diff --git a/snippets/visualbasic/System/AppDomain/CurrentDomain/adapplicationbase.vb b/snippets/visualbasic/System/AppDomain/CurrentDomain/adapplicationbase.vb deleted file mode 100644 index aefded4cf44..00000000000 --- a/snippets/visualbasic/System/AppDomain/CurrentDomain/adapplicationbase.vb +++ /dev/null @@ -1,30 +0,0 @@ -' -Class ADSetupInformation - - Shared Sub Main() - - Dim root As AppDomain = AppDomain.CurrentDomain - - Dim setup As New AppDomainSetup() - setup.ApplicationBase = _ - root.SetupInformation.ApplicationBase & "MyAppSubfolder\" - - Dim domain As AppDomain = AppDomain.CreateDomain("MyDomain", Nothing, setup) - - Console.WriteLine("Application base of {0}:" & vbCrLf & vbTab & "{1}", _ - root.FriendlyName, root.SetupInformation.ApplicationBase) - Console.WriteLine("Application base of {0}:" & vbCrLf & vbTab & "{1}", _ - domain.FriendlyName, domain.SetupInformation.ApplicationBase) - - AppDomain.Unload(domain) - End Sub -End Class - -' This example produces output similar to the following: -' -'Application base of MyApp.exe: -' C:\Program Files\MyApp\ -'Application base of MyDomain: -' C:\Program Files\MyApp\MyAppSubfolder\ -' - diff --git a/snippets/visualbasic/System/AppDomain/DynamicDirectory/addynamicbase.vb b/snippets/visualbasic/System/AppDomain/DynamicDirectory/addynamicbase.vb deleted file mode 100644 index efe5f3ffe86..00000000000 --- a/snippets/visualbasic/System/AppDomain/DynamicDirectory/addynamicbase.vb +++ /dev/null @@ -1,105 +0,0 @@ -' -Imports System.Reflection -Imports System.Reflection.Emit - -Public Class Example - Inherits MarshalByRefObject - - Shared Sub Main(args() As String) - - ' Prepare to create a new application domain. - Dim setup As New AppDomainSetup() - - ' Set the application name before setting the dynamic base. - setup.ApplicationName = "Example" - - ' Set the location of the base directory where assembly resolution - ' probes for dynamic assemblies. Note that the hash code of the - ' application name is concatenated to the base directory name you - ' supply. - setup.DynamicBase = "C:\DynamicAssemblyDir" - Console.WriteLine("DynamicBase is set to '{0}'.", setup.DynamicBase) - - Dim ad As AppDomain = AppDomain.CreateDomain("MyDomain", Nothing, setup) - - ' The dynamic directory name is the dynamic base concatenated with - ' the application name: \\ - Dim dynamicDir As String = ad.DynamicDirectory - Console.WriteLine("Dynamic directory is '{0}'.", dynamicDir) - - ' The AssemblyBuilder won't create this directory automatically. - If Not System.IO.Directory.Exists(dynamicDir) Then - Console.WriteLine("Creating the dynamic directory.") - System.IO.Directory.CreateDirectory(dynamicDir) - End If - - ' Generate a dynamic assembly and store it in the dynamic - ' directory. - GenerateDynamicAssembly(dynamicDir) - - ' Create an instance of the Example class in the application domain, - ' and call its Test method to load the dynamic assembly and use it. - Dim ex As Example = CType( _ - ad.CreateInstanceAndUnwrap( _ - GetType(Example).Assembly.FullName, "Example"), Example) - ex.Test() - End Sub - - Public Sub Test() - - Dim dynAssem As [Assembly] = Assembly.Load( - "DynamicHelloWorld, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null") - - Dim myType As Type = dynAssem.GetType("HelloWorld") - myType.InvokeMember("HelloFromAD", BindingFlags.Public Or _ - BindingFlags.Static Or BindingFlags.InvokeMethod, _ - Type.DefaultBinder, Nothing, Nothing) 'New Object() {}) - End Sub - - - Private Shared Sub GenerateDynamicAssembly(ByVal location As String) - - ' Define the dynamic assembly and the module. There is only one - ' module in this assembly. Note that the call to DefineDynamicAssembly - ' specifies the location where the assembly will be saved. The - ' assembly version is 1.0.0.0. - ' - Dim asmName As New AssemblyName("DynamicHelloWorld") - asmName.Version = New Version("1.0.0.0") - - Dim ab As AssemblyBuilder = _ - AppDomain.CurrentDomain.DefineDynamicAssembly( _ - asmName, AssemblyBuilderAccess.Save, location) - - Dim moduleName As String = asmName.Name & ".dll" - Dim mb As ModuleBuilder = ab.DefineDynamicModule(asmName.Name, moduleName) - - ' Define the "HelloWorld" type, with one static method. - Dim tb As TypeBuilder = mb.DefineType("HelloWorld", TypeAttributes.Public) - Dim hello As MethodBuilder = tb.DefineMethod("HelloFromAD", _ - MethodAttributes.Public Or MethodAttributes.Static, Nothing, Nothing) - - ' The method displays a message that contains the name of the application - ' domain where the method is executed. - Dim il As ILGenerator = hello.GetILGenerator() - il.Emit(OpCodes.Ldstr, "Hello from '{0}'!") - il.Emit(OpCodes.Call, GetType(AppDomain).GetProperty("CurrentDomain").GetGetMethod()) - il.Emit(OpCodes.Call, GetType(AppDomain).GetProperty("FriendlyName").GetGetMethod()) - il.Emit(OpCodes.Call, GetType(Console).GetMethod("WriteLine", _ - New Type() { GetType(String), GetType(String) })) - il.Emit(OpCodes.Ret) - - ' Complete the HelloWorld type and save the assembly. The assembly - ' is placed in the location specified by DefineDynamicAssembly. - Dim myType As Type = tb.CreateType() - ab.Save(moduleName) - End Sub -End Class - -' This example produces output similar to the following: -' -'DynamicBase is set to 'C:\DynamicAssemblyDir\5e4a7545'. -'Dynamic directory is 'C:\DynamicAssemblyDir\5e4a7545\Example'. -'Creating the dynamic directory. -'Hello from 'MyDomain'! -' diff --git a/snippets/visualbasic/System/AppDomain/GetAssemblies/adgetassemblies.vb b/snippets/visualbasic/System/AppDomain/GetAssemblies/adgetassemblies.vb deleted file mode 100644 index 12e9b02532d..00000000000 --- a/snippets/visualbasic/System/AppDomain/GetAssemblies/adgetassemblies.vb +++ /dev/null @@ -1,28 +0,0 @@ -' -Imports System.Reflection -Imports System.Security.Policy - -Class ADGetAssemblies - - - Public Shared Sub Main() - Dim currentDomain As AppDomain = AppDomain.CurrentDomain - 'Provide the current application domain evidence for the assembly. - Dim asEvidence As Evidence = currentDomain.Evidence - 'Load the assembly from the application directory using a simple name. - - 'Create an assembly called CustomLibrary to run this sample. - currentDomain.Load("CustomLibrary", asEvidence) - - 'Make an array for the list of assemblies. - Dim assems As [Assembly]() = currentDomain.GetAssemblies() - - 'List the assemblies in the current application domain. - Console.WriteLine("List of assemblies loaded in current appdomain:") - Dim assem As [Assembly] - For Each assem In assems - Console.WriteLine(assem.ToString()) - Next assem - End Sub -End Class -' \ No newline at end of file diff --git a/snippets/visualbasic/System/AppDomain/Id/source.vb b/snippets/visualbasic/System/AppDomain/Id/source.vb deleted file mode 100644 index e2e830676fa..00000000000 --- a/snippets/visualbasic/System/AppDomain/Id/source.vb +++ /dev/null @@ -1,33 +0,0 @@ -' -Imports System.Reflection - -Public Class Example - - ' The following attribute indicates to the loader that assemblies - ' in the global assembly cache should be shared across multiple - ' application domains. - _ - Public Shared Sub Main() - ' Show information for the default application domain. - ShowDomainInfo() - - ' Create a new application domain and display its information. - Dim newDomain As AppDomain = AppDomain.CreateDomain("MyMultiDomain") - newDomain.DoCallBack(AddressOf ShowDomainInfo) - - End Sub - - - ' This method has the same signature as the CrossAppDomainDelegate, - ' so that it can be executed easily in the new application domain. - ' - Public Shared Sub ShowDomainInfo() - Dim ad As AppDomain = AppDomain.CurrentDomain - Console.WriteLine() - Console.WriteLine("FriendlyName: {0}", ad.FriendlyName) - Console.WriteLine("Id: {0}", ad.Id) - Console.WriteLine("IsDefaultAppDomain: {0}", ad.IsDefaultAppDomain()) - - End Sub -End Class -' \ No newline at end of file diff --git a/snippets/visualbasic/System/AppDomain/Load/loadraw.vb b/snippets/visualbasic/System/AppDomain/Load/loadraw.vb deleted file mode 100644 index bdfaa8ec83d..00000000000 --- a/snippets/visualbasic/System/AppDomain/Load/loadraw.vb +++ /dev/null @@ -1,79 +0,0 @@ -Option Strict On -Option Explicit On - -' -Imports System.IO -Imports System.Reflection -Imports System.Reflection.Emit - -Module Test - - Sub Main() - Dim currentDomain As AppDomain = AppDomain.CurrentDomain - - InstantiateMyType(currentDomain) ' Failed! - - AddHandler currentDomain.AssemblyResolve, AddressOf MyResolver - - InstantiateMyType(currentDomain) ' OK! - End Sub - - - Sub InstantiateMyType(domain As AppDomain) - Try - ' You must supply a valid fully qualified assembly name here. - domain.CreateInstance("Assembly text name, Version, Culture, PublicKeyToken", "MyType") - Catch e As Exception - Console.WriteLine(e.Message) - End Try - End Sub - - - ' Loads the content of a file to a byte array. - Function loadFile(filename As String) As Byte() - Dim fs As New FileStream(filename, FileMode.Open) - Dim buffer(CInt(fs.Length - 1)) As Byte - fs.Read(buffer, 0, buffer.Length) - fs.Close() - - Return buffer - End Function 'loadFile - - - Function MyResolver(sender As Object, args As ResolveEventArgs) As System.Reflection.Assembly - Dim domain As AppDomain = DirectCast(sender, AppDomain) - - ' Once the files are generated, this call is - ' actually no longer necessary. - EmitAssembly(domain) - - Dim rawAssembly As Byte() = loadFile("temp.dll") - Dim rawSymbolStore As Byte() = loadFile("temp.pdb") - Dim myAssembly As System.Reflection.Assembly = domain.Load(rawAssembly, rawSymbolStore) - - Return myAssembly - End Function 'MyResolver - - - ' Creates a dynamic assembly with symbol information - ' and saves them to temp.dll and temp.pdb - Sub EmitAssembly(domain As AppDomain) - Dim assemblyName As New AssemblyName() - assemblyName.Name = "MyAssembly" - - Dim assemblyBuilder As AssemblyBuilder = domain.DefineDynamicAssembly(assemblyName, AssemblyBuilderAccess.Save) - Dim moduleBuilder As ModuleBuilder = assemblyBuilder.DefineDynamicModule("MyModule", "temp.dll", True) - Dim typeBuilder As TypeBuilder = moduleBuilder.DefineType("MyType", TypeAttributes.Public) - - Dim constructorBuilder As ConstructorBuilder = typeBuilder.DefineConstructor(MethodAttributes.Public, CallingConventions.Standard, Nothing) - Dim ilGenerator As ILGenerator = constructorBuilder.GetILGenerator() - ilGenerator.EmitWriteLine("MyType instantiated!") - ilGenerator.Emit(OpCodes.Ret) - - typeBuilder.CreateType() - - assemblyBuilder.Save("temp.dll") - End Sub - -End Module 'Test -' \ No newline at end of file diff --git a/snippets/visualbasic/System/AppDomain/Load/source.vb b/snippets/visualbasic/System/AppDomain/Load/source.vb deleted file mode 100644 index 582e447a758..00000000000 --- a/snippets/visualbasic/System/AppDomain/Load/source.vb +++ /dev/null @@ -1,13 +0,0 @@ -Public Class TypedReferenceArray - Shared Sub Main() - Try -' - Dim ad As AppDomain = AppDomain.CreateDomain("ChildDomain") - ad.Load("MyAssembly") -' - Catch ex as Exception - Console.WriteLine(ex.Message) - Console.WriteLine(ex.StackTrace) - End Try - End Sub -End Class \ No newline at end of file diff --git a/snippets/visualbasic/System/AppDomain/ToString/adtostring.vb b/snippets/visualbasic/System/AppDomain/ToString/adtostring.vb deleted file mode 100644 index ef7d7b10629..00000000000 --- a/snippets/visualbasic/System/AppDomain/ToString/adtostring.vb +++ /dev/null @@ -1,28 +0,0 @@ -' -Imports System.Reflection -Imports System.Security.Policy - 'for evidence object - -Class ADSetup - - Public Shared Sub Main() - ' Create application domain setup information - Dim domaininfo As New AppDomainSetup() - - 'Create evidence for the new appdomain from evidence of the current application domain - Dim adevidence As Evidence = AppDomain.CurrentDomain.Evidence - - ' Create appdomain - Dim domain As AppDomain = AppDomain.CreateDomain("MyDomain", adevidence, domaininfo) - - ' Write out application domain information - Console.WriteLine(("Host domain: " + AppDomain.CurrentDomain.FriendlyName)) - Console.WriteLine(("child domain: " + domain.FriendlyName)) - Console.WriteLine(("child domain name using ToString:" + domain.ToString())) - Console.WriteLine() - - AppDomain.Unload(domain) - End Sub -End Class - -' \ No newline at end of file diff --git a/snippets/visualbasic/System/AppDomain/TypeResolve/typeresolve.vb b/snippets/visualbasic/System/AppDomain/TypeResolve/typeresolve.vb deleted file mode 100644 index e3561de8f38..00000000000 --- a/snippets/visualbasic/System/AppDomain/TypeResolve/typeresolve.vb +++ /dev/null @@ -1,80 +0,0 @@ -' VSWhidbey 445288 -' -Option Strict On -Option Explicit On - -Imports System.Reflection -Imports System.Reflection.Emit - -Module Test - - ' For this code example, the following information needs to be - ' available to both Main and the HandleTypeResolve event - ' handler: - Private ab As AssemblyBuilder - Private moduleName As String - - Sub Main() - - Dim currDom As AppDomain = AppDomain.CurrentDomain - - ' Create a dynamic assembly with one module, to be saved to - ' disk (AssemblyBuilderAccess.Save). - ' - Dim aName As AssemblyName = new AssemblyName() - aName.Name = "Transient" - moduleName = aName.Name + ".dll" - ab = currDom.DefineDynamicAssembly(aName, _ - AssemblyBuilderAccess.Save) - Dim mb As ModuleBuilder = _ - ab.DefineDynamicModule(aName.Name, moduleName) - - ' The dynamic assembly has just one dummy type, to demonstrate - ' type resolution. - Dim tb As TypeBuilder = mb.DefineType("Example") - tb.CreateType() - - - ' First, try to load the type without saving the dynamic - ' assembly and without hooking up the TypeResolve event. The - ' type cannot be loaded. - Try - Dim temp As Type = Type.GetType("Example", true) - Console.WriteLine("Loaded type {0}.", temp) - Catch ex As TypeLoadException - Console.WriteLine("Loader could not resolve the type.") - End Try - - ' Hook up the TypeResolve event. - ' - AddHandler currDom.TypeResolve, AddressOf HandleTypeResolve - - ' Now try to load the type again. The TypeResolve event is - ' raised, the dynamic assembly is saved, and the dummy type is - ' loaded successfully. Display it to the console, and create - ' an instance. - Dim t As Type = Type.GetType("Example", true) - Console.WriteLine("Loaded type ""{0}"".", t) - Dim o As Object = Activator.CreateInstance(t) - End Sub - - Private Function HandleTypeResolve(ByVal sender As Object, _ - ByVal e As ResolveEventArgs) As [Assembly] - - Console.WriteLine("TypeResolve event handler.") - - ' Save the dynamic assembly, and then load it using its - ' display name. Return the loaded assembly. - ' - ab.Save(moduleName) - Return [Assembly].Load(ab.FullName) - End Function -End Module - -' This code example produces the following output: -' -'Loader could not resolve the type. -'TypeResolve event handler. -'Loaded type "Example". -' -' \ No newline at end of file diff --git a/xml/System/AppDomain.xml b/xml/System/AppDomain.xml index d58b9b72ea5..bf71a51bd84 100644 --- a/xml/System/AppDomain.xml +++ b/xml/System/AppDomain.xml @@ -400,9 +400,6 @@ The property to obtain the base directory path, for display to the console. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/ADSetup/CPP/adsetup.cpp" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System/AppDomain/BaseDirectory/adsetup.cs" id="Snippet1"::: - :::code language="fsharp" source="~/snippets/fsharp/System/AppDomain/BaseDirectory/adsetup.fs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System/AppDomain/BaseDirectory/adsetup.vb" id="Snippet1"::: ]]> @@ -994,9 +991,6 @@ The The assembly that contains `Worker` must be loaded into both application domains, but it can load other assemblies that exist only in the new application domain. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/CreateInstanceAndUnwrap2/cpp/source.cpp" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System/AppDomain/CreateInstanceAndUnwrap/source.cs" id="Snippet1"::: - :::code language="fsharp" source="~/snippets/fsharp/System/AppDomain/CreateInstanceAndUnwrap/source.fs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System/AppDomain/CreateInstanceAndUnwrap/source.vb" id="Snippet1"::: ]]> @@ -1099,9 +1093,6 @@ The @@ -1216,9 +1207,6 @@ The @@ -1939,9 +1927,6 @@ The property is used to obtain an object that represents the current application domain. The property provides the name of the current application domain, which is then displayed at the command line. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/ADApplicationBase/CPP/adapplicationbase.cpp" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System/AppDomain/CurrentDomain/adapplicationbase.cs" id="Snippet1"::: - :::code language="fsharp" source="~/snippets/fsharp/System/AppDomain/CurrentDomain/adapplicationbase.fs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System/AppDomain/CurrentDomain/adapplicationbase.vb" id="Snippet1"::: ]]> @@ -2098,9 +2083,6 @@ The attribute that sets its version to 1.0.0.0. When you run the example, the assembly you compiled in the current directory is found before the dynamic directory is searched. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/ADDynamicBase/CPP/addynamicbase.cpp" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System/AppDomain/DynamicDirectory/addynamicbase.cs" id="Snippet1"::: - :::code language="fsharp" source="~/snippets/fsharp/System/AppDomain/DynamicDirectory/addynamicbase.fs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System/AppDomain/DynamicDirectory/addynamicbase.vb" id="Snippet1"::: ]]> @@ -2734,9 +2716,6 @@ The friendly name of the default application domain is the file name of the proc The following code example uses the property to get the friendly name of the current application domain. For the default application domain, the friendly name is the name of the application's executable file. The code example also displays additional information about the application domain. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/ADApplicationBase/CPP/adapplicationbase.cpp" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System/AppDomain/CurrentDomain/adapplicationbase.cs" id="Snippet1"::: - :::code language="fsharp" source="~/snippets/fsharp/System/AppDomain/CurrentDomain/adapplicationbase.fs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System/AppDomain/CurrentDomain/adapplicationbase.vb" id="Snippet1"::: ]]> @@ -2795,9 +2774,6 @@ The friendly name of the default application domain is the file name of the proc To run this code example, you need to create an assembly named `CustomLibrary.dll`, or change the assembly name that is passed to the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/ADGetAssemblies/CPP/adgetassemblies.cpp" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System/AppDomain/GetAssemblies/adgetassemblies.cs" id="Snippet1"::: - :::code language="fsharp" source="~/snippets/fsharp/System/AppDomain/GetAssemblies/adgetassemblies.fs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System/AppDomain/GetAssemblies/adgetassemblies.vb" id="Snippet1"::: ]]> @@ -3023,9 +2999,6 @@ The friendly name of the default application domain is the file name of the proc The following code example creates a second application domain and displays information about the default domain and the new domain. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.AppDomain.IsDefaultAppDomain/CPP/System.AppDomain.IsDefaultAppDomain.cpp" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System/AppDomain/Id/source.cs" id="Snippet1"::: - :::code language="fsharp" source="~/snippets/fsharp/System/AppDomain/Id/source.fs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System/AppDomain/Id/source.vb" id="Snippet1"::: ]]> @@ -3141,9 +3114,6 @@ The friendly name of the default application domain is the file name of the proc The following code example creates a second application domain and displays information about the default domain and the new domain. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.AppDomain.IsDefaultAppDomain/CPP/System.AppDomain.IsDefaultAppDomain.cpp" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System/AppDomain/Id/source.cs" id="Snippet1"::: - :::code language="fsharp" source="~/snippets/fsharp/System/AppDomain/Id/source.fs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System/AppDomain/Id/source.vb" id="Snippet1"::: ]]> @@ -3379,9 +3349,6 @@ The friendly name of the default application domain is the file name of the proc For this code example to run, you must provide the fully qualified assembly name. For information about how to obtain the fully qualified assembly name, see [Assembly Names](/dotnet/standard/assembly/names). :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/AppDomain_LoadRaw/CPP/loadraw.cpp" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System/AppDomain/Load/loadraw.cs" id="Snippet1"::: - :::code language="fsharp" source="~/snippets/fsharp/System/AppDomain/Load/loadraw.fs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System/AppDomain/Load/loadraw.vb" id="Snippet1"::: ]]> @@ -3453,9 +3420,6 @@ The friendly name of the default application domain is the file name of the proc If the current object represents application domain `A`, and the method is called from application domain `B`, the assembly is loaded into both application domains. For example, the following code loads `MyAssembly` into the new application domain `ChildDomain` and also into the application domain where the code executes: :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.appdomain.load/cpp/source.cpp" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System/AppDomain/Load/source.cs" id="Snippet1"::: - :::code language="fsharp" source="~/snippets/fsharp/System/AppDomain/Load/source.fs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System/AppDomain/Load/source.vb" id="Snippet1"::: The assembly is loaded into both domains because does not derive from , and therefore the return value of the method cannot be marshaled. Instead, the common language runtime tries to load the assembly into the calling application domain. The assemblies that are loaded into the two application domains might be different if the path settings for the two application domains are different. @@ -3614,9 +3578,6 @@ The friendly name of the default application domain is the file name of the proc For this code example to run, you must provide the fully qualified assembly name. For information about how to obtain the fully qualified assembly name, see [Assembly Names](/dotnet/standard/assembly/names). :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/AppDomain_LoadRaw/CPP/loadraw.cpp" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System/AppDomain/Load/loadraw.cs" id="Snippet1"::: - :::code language="fsharp" source="~/snippets/fsharp/System/AppDomain/Load/loadraw.fs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System/AppDomain/Load/loadraw.vb" id="Snippet1"::: ]]> @@ -4885,9 +4846,6 @@ The method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/ADToString/CPP/adtostring.cpp" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System/AppDomain/ToString/adtostring.cs" id="Snippet1"::: - :::code language="fsharp" source="~/snippets/fsharp/System/AppDomain/ToString/adtostring.fs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System/AppDomain/ToString/adtostring.vb" id="Snippet1"::: ]]> @@ -4964,9 +4922,6 @@ The From 71951f2dc79d4c722379c691efe6c8bfd60e2261 Mon Sep 17 00:00:00 2001 From: Genevieve Warren <24882762+gewarren@users.noreply.github.com> Date: Thu, 25 Jun 2026 17:18:07 -0700 Subject: [PATCH 6/6] delete C++ snippet refs --- xml/System/AppDomain.xml | 182 +++++---------------------------------- 1 file changed, 20 insertions(+), 162 deletions(-) diff --git a/xml/System/AppDomain.xml b/xml/System/AppDomain.xml index bf71a51bd84..6c149c1336d 100644 --- a/xml/System/AppDomain.xml +++ b/xml/System/AppDomain.xml @@ -245,8 +245,6 @@ In modern .NET versions, the implementation is limited b For more information about handling events, see [Handling and Raising Events](/dotnet/standard/events/). - - ## Examples The following sample demonstrates the event. @@ -394,13 +392,6 @@ The property. It can also be retrieved using the method with the string "APPBASE". - - -## Examples - The following code example creates a new application domain, specifying a base directory to use when searching for assemblies to load into the domain. The example then uses the property to obtain the base directory path, for display to the console. - - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/ADSetup/CPP/adsetup.cpp" id="Snippet1"::: - ]]> The operation is attempted on an unloaded application domain. @@ -980,17 +971,7 @@ The for the format of `assemblyName`. See the property for the format of `typeName`. > [!NOTE] -> If you make an early-bound call to a method `M` of an object of type `T1` that was returned by , and that method makes an early-bound call to a method of an object of type `T2` in an assembly `C` other than the current assembly or the assembly containing `T1`, assembly `C` is loaded into the current application domain. This loading occurs even if the early-bound call to `T1.M()` was made in the body of a , or in other dynamically generated code. If the current domain is the default domain, assembly `C` cannot be unloaded until the process ends. If the current domain later attempts to load assembly `C`, the load might fail. - - - -## Examples - The following code example shows the simplest way to execute code in another application domain. The example defines a class named `Worker` that inherits from . The `Worker` class defines a method that displays the name of the application domain in which it is executing. The example creates instances of `Worker` in the default application domain and in a new application domain. - -> [!NOTE] -> The assembly that contains `Worker` must be loaded into both application domains, but it can load other assemblies that exist only in the new application domain. - - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/CreateInstanceAndUnwrap2/cpp/source.cpp" id="Snippet1"::: +> If you make an early-bound call to a method `M` of an object of type `T1` that was returned by , and that method makes an early-bound call to a method of an object of type `T2` in an assembly `C` other than the current assembly or the assembly containing `T1`, assembly `C` is loaded into the current application domain. This loading occurs even if the early-bound call to `T1.M()` was made in the body of a , or in other dynamically generated code. If the current domain is the default domain, assembly `C` cannot be unloaded until the process ends. If the current domain later attempts to load assembly `C`, the load might fail. ]]> @@ -1087,12 +1068,7 @@ The for the format of `assemblyName`. See the property for the format of `typeName`. > [!NOTE] -> If you make an early-bound call to a method `M` of an object of type `T1` that was returned by , and that method makes an early-bound call to a method of an object of type `T2` in an assembly `C` other than the current assembly or the assembly containing `T1`, assembly `C` is loaded into the current application domain. This loading occurs even if the early-bound call to `T1.M()` was made in the body of a , or in other dynamically generated code. If the current domain is the default domain, assembly `C` cannot be unloaded until the process ends. If the current domain later attempts to load assembly `C`, the load might fail. - - - -## Examples - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/ADDyno/CPP/addyno.cpp" id="Snippet1"::: +> If you make an early-bound call to a method `M` of an object of type `T1` that was returned by , and that method makes an early-bound call to a method of an object of type `T2` in an assembly `C` other than the current assembly or the assembly containing `T1`, assembly `C` is loaded into the current application domain. This loading occurs even if the early-bound call to `T1.M()` was made in the body of a , or in other dynamically generated code. If the current domain is the default domain, assembly `C` cannot be unloaded until the process ends. If the current domain later attempts to load assembly `C`, the load might fail. ]]> @@ -1199,14 +1175,7 @@ The for the format of `assemblyName`. See the property for the format of `typeName`. > [!NOTE] -> If you make an early-bound call to a method `M` of an object of type `T1` that was returned by , and that method makes an early-bound call to a method of an object of type `T2` in an assembly `C` other than the current assembly or the assembly containing `T1`, assembly `C` is loaded into the current application domain. This loading occurs even if the early-bound call to `T1.M()` was made in the body of a , or in other dynamically generated code. If the current domain is the default domain, assembly `C` cannot be unloaded until the process ends. If the current domain later attempts to load assembly `C`, the load might fail. - - - -## Examples - The following sample demonstrates the use of the `ignoreCase` parameter. - - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/AppDomain_CreateInstance_IgnoreCase/CPP/ignorecase.cpp" id="Snippet1"::: +> If you make an early-bound call to a method `M` of an object of type `T1` that was returned by , and that method makes an early-bound call to a method of an object of type `T2` in an assembly `C` other than the current assembly or the assembly containing `T1`, assembly `C` is loaded into the current application domain. This loading occurs even if the early-bound call to `T1.M()` was made in the body of a , or in other dynamically generated code. If the current domain is the default domain, assembly `C` cannot be unloaded until the process ends. If the current domain later attempts to load assembly `C`, the load might fail. ]]> @@ -1305,25 +1274,20 @@ The method is used to create an instance in a target application domain, other than the application domain from which the call is made, the assembly is loaded in the target application domain. However, if the instance is unwrapped in the calling application domain, using the unwrapped instance in certain ways can cause the assembly to be loaded into the calling application domain. For example, after the instance is unwrapped, its type information might be requested, in order to call its methods late-bound. When the assembly is loaded into the calling application domain, exceptions can occur. - If another version of the same assembly was previously loaded into the calling application domain, or if the load path of the calling application domain is different from that of the target application domain, exceptions such as can occur. - - If the calling application domain makes early-bound calls to the instance type, can be thrown when an attempt is made to cast the instance. - - ## Examples The following example shows how to use the method overload to create an instance of an object in a target application domain and call its methods. The example defines the `MarshalableExample` class, which can be marshaled across application domain boundaries. The example builds a path to the currently executing assembly, creates a target application domain, and uses the method overload to load the example assembly into the target application domain and create an instance of `MarshalableExample`. > [!NOTE] -> The path is absolute in this example, but a relative path would also work because the method is used to load the assembly. +> The path is absolute in this example, but a relative path would also work because the method is used to load the assembly. After unwrapping the object handle, the example demonstrates three ways to use an object in a target application domain: - Invoking a method with late binding, using reflection. This requires type information, which causes the assembly to be loaded into the application domain of the caller. (In this example, it is already loaded.) - - Casting the object to an interface known to both the caller and the callee. If the interface is defined in the calling assembly or in a third assembly referenced by both the caller and the callee, the called assembly is not loaded into the application domain of the caller. - - Using the object directly when its type is known to the caller. The assembly must be loaded into the application domain of the caller. Another way to avoid loading the called assembly into the application domain of the caller is for the caller to derive from the class and to define a method that can be run in the target application domain. That method can use reflection to examine a target assembly, because the target assembly is already loaded into the target application domain. See the example for the property. @@ -1920,16 +1884,7 @@ The Gets the current application domain for the current . The current application domain. - - property is used to obtain an object that represents the current application domain. The property provides the name of the current application domain, which is then displayed at the command line. - - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/ADApplicationBase/CPP/adapplicationbase.cpp" id="Snippet1"::: - - ]]> - + To be added. @@ -1999,7 +1954,7 @@ The delegate does not identify the domain that is being unloaded. > [!NOTE] -> This event is never raised in the default application domain. +> This event is never raised in the default application domain. Do not make assumptions about the thread the event is raised on. The event can be raised on a different thread than the one that called the method. @@ -2061,28 +2016,7 @@ The property of the object that will be used to create the new application domain. The base directory path you assign to the property is modified by the addition of a subdirectory whose simple name is the hash code of the string you assign to the property, so the format of the base directory is *original path*\\*hash code*. The dynamic directory is a subdirectory of this base directory. Its simple name is the value of the property, so its format is *original path*\\*hash code*\\*application name*. - - - -## Examples - The following example creates an application domain with a directory for dynamic assemblies, emits a dynamic assembly and stores it in the dynamic directory, and then loads the assembly into the new application domain and uses it. - - The example creates an object and sets its property to "Example" and its property to "C:\DynamicAssemblyDir". The example then displays the property, to show that the hash code of the application name has been appended as a subdirectory of the path that was originally assigned. - -> [!NOTE] -> The base directory in this example is intended to be outside the probing path for the example application. Be sure to compile the example in a different location. Delete the base directory and all its subdirectories each time you run the example. - - The example creates a new application domain, using the object. The example uses the property to retrieve the name of the directory, so it can create the directory. (The example could just as easily create the directory beforehand by concatenating the original path, the hash code of the application name, and the application name.) - - The example has a `GenerateDynamicAssembly` method that emits an assembly named `DynamicHelloWorld.dll` and stores it in the new application domain's dynamic directory. The dynamic assembly contains one type, `HelloWorld`, that has a static method (`Shared` method in Visual Basic) named `HelloFromAD`. Calling this method displays the name of the application domain. - - The `Example` class derives from , so the example can create an instance of the class in the new application domain and call its `Test` method. The `Test` method loads the dynamic assembly by its display name and calls the static `HelloFromAD` method. - - You can show that the dynamic directory is searched after the normal probing paths by writing code for an assembly named `DynamicHelloWorld.dll` and compiling it in the same directory as this example. The assembly must have a class named `HelloWorld` with a static method named `HelloFromAD`. This method does not have to have the same functionality as the one in the example; it can simply display a string to the console. The assembly must also have an attribute that sets its version to 1.0.0.0. When you run the example, the assembly you compiled in the current directory is found before the dynamic directory is searched. - - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/ADDynamicBase/CPP/addynamicbase.cpp" id="Snippet1"::: +To set the dynamic directory, assign a base directory path to the property of the object that will be used to create the new application domain. The base directory path you assign to the property is modified by the addition of a subdirectory whose simple name is the hash code of the string you assign to the property, so the format of the base directory is *original path*\\*hash code*. The dynamic directory is a subdirectory of this base directory. Its simple name is the value of the property, so its format is *original path*\\*hash code*\\*application name*. ]]> @@ -2163,8 +2097,6 @@ The to load and execute, use the method. - - ## Examples The following sample demonstrates using one of the overloads of on two different domains. @@ -2712,11 +2644,6 @@ The property to get the friendly name of the current application domain. For the default application domain, the friendly name is the name of the application's executable file. The code example also displays additional information about the application domain. - - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/ADApplicationBase/CPP/adapplicationbase.cpp" id="Snippet1"::: - ]]> The operation is attempted on an unloaded application domain. @@ -2765,18 +2692,7 @@ The friendly name of the default application domain is the file name of the proc Gets the assemblies that have been loaded into the execution context of this application domain. An array of assemblies in this application domain. - - method to get a list of all assemblies that have been loaded into the application domain. The assemblies are then displayed to the console. - - To run this code example, you need to create an assembly named `CustomLibrary.dll`, or change the assembly name that is passed to the method. - - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/ADGetAssemblies/CPP/adgetassemblies.cpp" id="Snippet1"::: - - ]]> - + To be added. The operation is attempted on an unloaded application domain. @@ -2911,10 +2827,10 @@ The friendly name of the default application domain is the file name of the proc The following table describes the `name` of each predefined system entry and its corresponding property. -|Value of 'name'|Property| -|---------------------|--------------| -|"APPBASE"|| -|"APP_CONFIG_FILE"|| +| Value of 'name' | Property | +|-------------------|------------------------------------------------------------------------------| +| "APPBASE" | | +| "APP_CONFIG_FILE" | | |"APP_LAUNCH_URL"|(no property)

"APP_LAUNCH_URL" represents the URL originally requested by the user, before any redirection. It is available only when the application has been launched with a browser. Not all browsers provide this value.| |"APP_NAME"|| |"BINPATH_PROBE_ONLY"|| @@ -2933,8 +2849,6 @@ The friendly name of the default application domain is the file name of the proc |"REGEX_DEFAULT_MATCH_TIMEOUT"|

"REGEX_DEFAULT_MATCH_TIMEOUT" is not a system entry, and its value can be set by calling the method.| |"SHADOW_COPY_DIRS"|| - - ## Examples The following example creates a new application domain, sets a system-provided value for the domain, and adds a new value pair for the domain. The example then demonstrates how to use the method to retrieve the data from these value pairs and display them to the console. @@ -2992,16 +2906,7 @@ The friendly name of the default application domain is the file name of the proc Gets an integer that uniquely identifies the application domain within the process. An integer that identifies the application domain. - - - + To be added. @@ -3108,13 +3013,6 @@ The friendly name of the default application domain is the file name of the proc ## Remarks Every managed process has a default application domain. Execution begins in the default domain. - - -## Examples - The following code example creates a second application domain and displays information about the default domain and the new domain. - - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.AppDomain.IsDefaultAppDomain/CPP/System.AppDomain.IsDefaultAppDomain.cpp" id="Snippet1"::: - ]]> @@ -3172,12 +3070,12 @@ The friendly name of the default application domain is the file name of the proc An object's finalization method is called in one of the following situations: during garbage collection, when the common language runtime is shutting down, or when the application domain that contains the object is unloaded. The method returns `true` only in the last case; it does not return `true` if finalization results from routine garbage collection or from CLR shutdown. > [!NOTE] -> To determine whether finalization is due to CLR shutdown, use the property. It returns `true` if finalization is due to an application domain being unloaded or to the CLR shutting down. +> To determine whether finalization is due to CLR shutdown, use the property. It returns `true` if finalization is due to an application domain being unloaded or to the CLR shutting down. While executing in your finalization method during domain unloading, you might want to access another object that is referenced by a static field and has a finalization method. However, you cannot reliably do so because the accessed object might already have been finalized. > [!NOTE] -> An exception to this rule is the class, which contains static fields that reference stream objects, but is implemented specially so you can always write to the system console, even during domain unloading or system shutdown. +> An exception to this rule is the class, which contains static fields that reference stream objects, but is implemented specially so you can always write to the system console, even during domain unloading or system shutdown. Use this method in an object's finalization method to determine whether the application domain that contains the object is unloading. If that is the case, you cannot reliably access any object that has a finalization method and is referenced by a static field. @@ -3343,13 +3241,6 @@ The friendly name of the default application domain is the file name of the proc ## Remarks For information that is common to all overloads of this method, see the method overload. -## Examples - The following sample demonstrates the use of loading a raw assembly. - - For this code example to run, you must provide the fully qualified assembly name. For information about how to obtain the fully qualified assembly name, see [Assembly Names](/dotnet/standard/assembly/names). - - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/AppDomain_LoadRaw/CPP/loadraw.cpp" id="Snippet1"::: - ]]> @@ -3417,14 +3308,10 @@ The friendly name of the default application domain is the file name of the proc Supplying a partial assembly name for `assemblyRef` is not recommended. (A partial name omits one or more of culture, version, or public key token. For overloads that take a string instead of an object, "MyAssembly, Version=1.0.0.0" is an example of a partial name and "MyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=18ab3442da84b47" is an example of a full name.) Using partial names has a negative effect on performance. In addition, a partial assembly name can load an assembly from the global assembly cache only if there is an exact copy of the assembly in the application base directory ( or ). - If the current object represents application domain `A`, and the method is called from application domain `B`, the assembly is loaded into both application domains. For example, the following code loads `MyAssembly` into the new application domain `ChildDomain` and also into the application domain where the code executes: - - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.appdomain.load/cpp/source.cpp" id="Snippet1"::: - - The assembly is loaded into both domains because does not derive from , and therefore the return value of the method cannot be marshaled. Instead, the common language runtime tries to load the assembly into the calling application domain. The assemblies that are loaded into the two application domains might be different if the path settings for the two application domains are different. + If the current object represents application domain `A`, and the method is called from application domain `B`, the assembly is loaded into both application domains. The assembly is loaded into both domains because does not derive from , and therefore the return value of the method cannot be marshaled. Instead, the common language runtime tries to load the assembly into the calling application domain. The assemblies that are loaded into the two application domains might be different if the path settings for the two application domains are different. > [!NOTE] -> If both the property and the property are set, the first attempt to load the assembly uses the display name (including version, culture, and so on, as returned by the property). If the file is not found, the property is used to search for the assembly. If the assembly is found using , the display name is matched against the assembly. If the match fails, a is thrown. +> If both the property and the property are set, the first attempt to load the assembly uses the display name (including version, culture, and so on, as returned by the property). If the file is not found, the property is used to search for the assembly. If the assembly is found using , the display name is matched against the assembly. If the match fails, a is thrown. ]]> @@ -3572,13 +3459,6 @@ The friendly name of the default application domain is the file name of the proc ## Remarks For information that is common to all overloads of this method, see the method overload. -## Examples - The following sample demonstrates the use of loading a raw assembly. - - For this code example to run, you must provide the fully qualified assembly name. For information about how to obtain the fully qualified assembly name, see [Assembly Names](/dotnet/standard/assembly/names). - - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/AppDomain_LoadRaw/CPP/loadraw.cpp" id="Snippet1"::: - ]]> @@ -4022,7 +3902,7 @@ This event is raised in each application domain that registers an event handler. In the reflection-only context, dependencies are not resolved automatically. They must be preloaded or returned by the handler for this event. This event is raised when an assembly has a dependency that is not already loaded into the reflection-only context. The missing dependency is specified by the property. The for this event must return an assembly that satisfies the dependency. The assembly that is returned must be loaded into the reflection-only context. > [!IMPORTANT] -> This event is raised only for missing dependencies of the assembly that you are loading into the reflection-only context (for example, by using the method). It is not raised if the assembly that you are loading cannot be found. +> This event is raised only for missing dependencies of the assembly that you are loading into the reflection-only context (for example, by using the method). It is not raised if the assembly that you are loading cannot be found. The property returns the assembly that requested the assembly load that could not be resolved. Knowing the identity of the requesting assembly might be useful in identifying the correct version of the dependency, if more than one version is available. For more information, see . @@ -4083,8 +3963,6 @@ The method. - - ## Examples The following code example loads the System.dll assembly into the execution context and then into the reflection-only context. The and methods are used to display the assemblies loaded into each context. @@ -4217,7 +4095,7 @@ The for this event can attempt to locate the assembly containing the resource and return it. > [!IMPORTANT] -> This event is not raised if resolution fails because no file can be found for a valid linked resource. It is raised if a manifest resource stream cannot be found, but it is not raised if an individual resource key cannot be found. +> This event is not raised if resolution fails because no file can be found for a valid linked resource. It is raised if a manifest resource stream cannot be found, but it is not raised if an individual resource key cannot be found. The property contains the assembly that requested the resource. For more information, see . @@ -4370,8 +4248,6 @@ The value that represents the timeout interval as the value of the `data` argument. You can also insert or modify your own user defined name-data pairs with this method and inspect their values with the method. - - ## Examples The following example demonstrates how to use the method to create a new value pair. The example then uses the method to retrieve the value, and displays it to the console. @@ -4502,8 +4378,6 @@ The property. For example, if you set to a given principal (for example, a generic principal) and then use the method to set the to , the current principal will remain the generic principal. - - ## Examples The following example shows the effect on threads of using the method to change the principal policy of the application domain. It also shows the effect of using the method to change the principal that is available for attaching to threads in the application domain. @@ -4839,16 +4713,7 @@ The Obtains a string representation that includes the friendly name of the application domain and any context policies. A string formed by concatenating the literal string "Name:", the friendly name of the application domain, and either string representations of the context policies or the string "There are no context policies." - - method. - - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/ADToString/CPP/adtostring.cpp" id="Snippet1"::: - - ]]> - + To be added. The application domain represented by the current has been unloaded. @@ -4916,13 +4781,6 @@ The event. - - For this code example to run, you must provide the fully qualified assembly name. For information about how to obtain the fully qualified assembly name, see [Assembly Names](/dotnet/standard/assembly/names). - - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/AppDomain_TypeResolve/CPP/typeresolve.cpp" id="Snippet1"::: - ]]>