Skip to content

Commit e11219f

Browse files
authored
AssemblyBuilder: Fix the example not to ignore the created instance (#10238)
1 parent 6068e76 commit e11219f

File tree

1 file changed

+1
-1
lines changed
  • snippets/csharp/System.Reflection.Emit/AssemblyBuilder/Overview

1 file changed

+1
-1
lines changed

snippets/csharp/System.Reflection.Emit/AssemblyBuilder/Overview/24895.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ public int MyMethod(int multiplier)
210210
// property value.
211211
object? o2 = null;
212212
if (t is not null)
213-
Activator.CreateInstance(t, new object[] { 5280 });
213+
o2 = Activator.CreateInstance(t, new object[] { 5280 });
214214
Console.WriteLine("o2.Number: {0}", pi?.GetValue(o2, null));
215215
}
216216
}

0 commit comments

Comments
 (0)