Visual Studio code generating

I am new to Visual Studio 2010 (VB Basic) and I am a stickler for being consistent. When I add a button to a form I get this:
Private Sub btnCalculate_Click(sender As
System.Object, e As System.EventArgs)
Handles btnCalculate.Click

Open in new window

Why is it that in every book I have they show it this way:
Private Sub btnCalculate_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs)
Handles btnCalculate.Click

Open in new window

It is the ByVal I'm missing. Why? I'm using the Professional version 10.0.402191.1 SP1 Rel
and .Net version 4.0.30319. SP1 Rel. I had no problem with my install but is there an option I need to set?
Frank FreeseAsked:
Who is Participating?
Its just a change in VS2010 SP1.

ByVal is considered the default and it is considered to be "cleaner" code to leave it off and just know that if it doesn't say "ByRef" that it is defaulting to "ByVal".

I think you're stuck with it for now at least, or run VS2010 without the SP1.

Some stuff I've read "hints" or "doesn't hint" in true MS fashion that there may be an option in a later service pack.

Just for some context:
David L. HansenProgrammer AnalystCommented:
Apparently microsoft wanted to bring vb and c# a little closer together and suppress the "ByVal" from being shown in the code.  It is assumed to be byVal unless you change it to byRef I assume.  It's really just cosmetic.
Frank FreeseAuthor Commented:
so I must have a later version than what these authors us.
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

Yes. Authors may choose to print byval for clarity anyway. You do understand the difference right?
Frank FreeseAuthor Commented:
CodeCruiser: I'm getting a lot closer to understanding by just "digging" my heals in until I can see the picture. I do not like going "backwards" so I'll ignore the ByVal until I have a need for clarity sakes.
ddayx10: thanks for the update
all added good comments so I'll distribute my points equally. Always appreciate the Experts. Always
Frank FreeseAuthor Commented:
thank you - I'll be back
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.