Visual Studio code generating

Experts,
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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

David L. HansenCEOCommented:
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.
0
Frank FreeseAuthor Commented:
so I must have a later version than what these authors us.
0
CodeCruiserCommented:
Yes. Authors may choose to print byval for clarity anyway. You do understand the difference right?
0
JavaScript Best Practices

Save hours in development time and avoid common mistakes by learning the best practices to use for JavaScript.

ddayx10Commented:
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:
http://msmvps.com/blogs/carlosq/archive/2011/03/15/vs-2010-sp1-changing-quot-byval-quot-vb-net-code-editor-experience.aspx
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
0
Frank FreeseAuthor Commented:
thank you - I'll be back
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.