Beef
Beef copied to clipboard
Debugger Watch window doesn't recognize variables below 'using struct' block.
Watch window is not able to see ptr.
using System;
namespace BeefTest;
struct Inner
{
using struct
{
public int x = ?;
}wrapper;
int* ptr = &x;
public this()
{
x = 1;
}
public void Modify(int val)
{
*ptr = val;
}
public int GetVal() => x;
}
class Program
{
public static void Main()
{
Inner inn = .();
inn.Modify(7);
Console.WriteLine($"wrapper x = {inn.GetVal()}"); // works fine.
}
}