I have a vb.net solution with a web reference to a webservice. Now I need another property in the designer generated code. This has the drawback, that once you update the web reference, your added code will be overitten.
What is the best way to add a property to the class?
Update the class to be a partial class (might already be from the code generation) and then create another code file in your solution which won’t be overridden. In there create a partial class of the same name (in the same namespace) as the generated code and add the property to this. This will have the benefit of not being overridden when the web service code is regenerated.
When you call the generated code class you then should be able to access the property which you have added to the other part of the partial class.
Hope this helps.