-
Notifications
You must be signed in to change notification settings - Fork 219
Open
Description
Unknown (0x7FFB66EAAF18)
; Method signature was not found -- please report this issue.
; Failed to find JIT output. This might appear more frequently than before due to a library update.
; Please monitor #1334 for progress.
using System;
public struct ScopeStruct : IDisposable
{
public int Value;
public ScopeStruct(int value)
{
Value = value;
Console.WriteLine($"ScopeStruct created: {value}");
}
public void Dispose()
{
Console.WriteLine($"ScopeStruct disposed: {Value}");
}
}
public class ScopeClass : IDisposable
{
public int Value;
public ScopeClass(int value)
{
Value = value;
Console.WriteLine($"ScopeClass created: {value}");
}
public void Dispose()
{
Console.WriteLine($"ScopeClass disposed: {Value}");
}
}
public class HelloWorld
{
public static void Main(string[] args)
{
Console.WriteLine("=== Using with STRUCT ===");
TestStruct();
Console.WriteLine("\n=== Using with CLASS ===");
TestClass();
}
public static void TestStruct()
{
using (var scope = new ScopeStruct(42))
{
Console.WriteLine($"Inside using block: {scope.Value}");
}
}
public static void TestClass()
{
using (var scope = new ScopeClass(99))
{
Console.WriteLine($"Inside using block: {scope.Value}");
}
}
}
JIT Asm
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels