RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Using output/reference parameters in the constructor?

I wanted to create a general input string gump that would be called whenever another Gump needed a String to be input by a player.

So I wondered: If the input gump had a string attribute that is set by a reference or output (reference seems more likely) parameter in the constructor and that is later changed in the OnResponse method when pressing the accept button, would the original reference that was passed inside the constructor be affected too?
 

Jeff

Lord
You could always use IntPtr and marshal the value to string and vice versa... but Callbacks are a cleaner approach.
 
Top