In VB.NET you can pass parameters by reference (ByRef) or by value (byVal).
Is there a word that can be used to refer to this?
-Frinny
..could u clarify your question a bit...i dont quite understand, do you mean like how u can reference a class or most objects to something less you have to type?
..could u clarify your question a bit...i dont quite understand, do you mean like how u can reference a class or most objects to something less you have to type?
joedeene
I am looking for a word to explain what ByRef and ByVal are.
For example the word "scope" or "modifiers" refers to keywords like "Public", "Private", "Protected" etc.
Is there a word like the this that can be used to refer to ByRef and ByVal?
MSDN calls them keywords. I would call them "argument keywords" maybe?
Hmm I guess there is no word.
I just used several sentences to explain what I was trying to say instead of trying to explain everything in a one line comment....alth ough "argument keywords" best suits them.
I just used several sentences to explain what I was trying to say instead of trying to explain everything in a one line comment....alth ough "argument keywords" best suits them.
It seems that googling Argument Modifiers doesn't really help in understanding what I'm trying to explain. It's too abstract of a concept....
I've decided that if my audience doesn't know what ByRef is, then they can search the web themselves to understand what I'm trying to say.
It is nice to know that ByVal and ByRef are Argument Modifiers though!
Thanks again :)
-Frinny
No worries... they are a pretty abstract concept... especially if the reader doesn't understand pointers. It would be akin to trying to explain AddressOf.
I'm not sure what the easiest way to explain this concept would be...
Maybe:
ByVal tells the method that the value is being passed as a value, ByRef tells the method that it is accepting the placeholder for that value and that if the value is changed in that placeholder then the changed value would also be reflected in the calling code?
For someone that doesn't understand it, it's a hard concept to grasp... mostly I think because it's such a hard concept to explain. Once you get it, it's simple, but it's still hard to explain to someone else...
What I needed to explain was that I was declaring empty string variables because the method I am calling in the example expects parameters using ByRef.
I didn't really want to get into to many details because I am hoping that the end user (a developer) understands ByVal and ByRef...I'm hoping that if they don't understand my comment that they'll look it up.......instea d of calling me.....
Comment