wow i just learned that if you do
-
wow i just learned that if you do
`myStruct.SomeMethod(out myStruct)`
in C# then when you assign to the out parameter it'll mutate `this` inside the function. which was causing a bug where right clicking my axe made it vanish into the ether
so that was a fun bit of trivia i didn't know
-
wow i just learned that if you do
`myStruct.SomeMethod(out myStruct)`
in C# then when you assign to the out parameter it'll mutate `this` inside the function. which was causing a bug where right clicking my axe made it vanish into the ether
so that was a fun bit of trivia i didn't know
@eniko ooh, that's a devious behavior
-
@eniko ooh, that's a devious behavior
@foone yeah. I was swapping two structs involved in a click exchange through the out parameters. And I set the source to nothing, then the destination to this
So setting the source to nothing set this to nothing so dest was nothing so my axe just blinked out of existence lol
-
undefined Oblomov shared this topic on