I am writing a .net c# application. 开发者_JS百科I retrieve some data from an xml file, cache the data to the .net cache and return it from my method. I perform some processing on the data and return
So strin开发者_如何学Gogs are reference types right? My understanding is a reference to the string in the heap is passed even when you pass the string ByVal to a method.
Is there any way to use ParamArray ByRef? Barring that, it there a workaround that accomplishes the same thing?
As I u开发者_JAVA百科nderstand it, C# passes parameters into methods by reference. In VB.NET, you can specify this with ByVal and ByRef. The default is ByVal.
Switching Byref to Byval on method calls I have many warnings raised due to: \"Implicit conversion from xxxx to yyyy in copying the value of \'ByRef\' parameter zzzz back to the matching argument.\"
I sort of understand why this is happening, but not entirely. I have a base class with a Shared (Static) variable, declared like so: