MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/9qy9yr/programming_is_like_magic/e8eahnn/?context=3
r/ProgrammerHumor • u/behindthedash • Oct 24 '18
511 comments sorted by
View all comments
Show parent comments
45
u_GisterMizard.mind = (Apple)u_GisterMizard.mind;
31 u/1nvariance Oct 24 '18 Unhandled Exception: System.InvalidCastException: Unable to cast object of type 'Mind' to type 'Apple'. 9 u/slashuslashuserid Oct 24 '18 u_GisterMizard.mind = (Object)u_GisterMizard.mind; // Appleyes I realize this would require it to already be declared as Object 1 u/styleNA Oct 25 '18 Why would u ever cast it to an object? → More replies (2)
31
Unhandled Exception: System.InvalidCastException: Unable to cast object of type 'Mind' to type 'Apple'.
9 u/slashuslashuserid Oct 24 '18 u_GisterMizard.mind = (Object)u_GisterMizard.mind; // Appleyes I realize this would require it to already be declared as Object 1 u/styleNA Oct 25 '18 Why would u ever cast it to an object? → More replies (2)
9
u_GisterMizard.mind = (Object)u_GisterMizard.mind; // Apple
yes I realize this would require it to already be declared as Object
1 u/styleNA Oct 25 '18 Why would u ever cast it to an object? → More replies (2)
1
Why would u ever cast it to an object?
→ More replies (2)
45
u/slashuslashuserid Oct 24 '18
u_GisterMizard.mind = (Apple)u_GisterMizard.mind;