static IntRefContainer CreateContainer() { var x = 123; var container = new IntRefContainer(); container.AssignAll(ref x); // Compiler prohibits this because of the [UnscopedRef] attribute return container; }