Alessandro Del Sole's Blog

/* A programming space about Microsoft® .NET® */
posts - 147, comments - 0, trackbacks - 0

My Links

News

Your host

This is me! This space is about Microsoft® .NET® and Microsoft® Visual Basic development. Enjoy! :-)

These postings are provided 'AS IS' for entertainment purposes only with absolutely no warranty expressed or implied and confer no rights.

Microsoft MVP

My MVP Profile

I'm a VB!

Watch my interview in Seattle

My new book on VB 2015!

Pre-order VB 2015 Unleashed Pre-order my new book "Visual Basic 2015 Unleashed". Click for more info!

My new book on LightSwitch!

Visual Studio LightSwitch Unleashed My book "Visual Studio LightSwitch Unleashed" is available. Click the cover!

Your visits

Follow me on Twitter!

CodePlex download Download my open-source projects from CodePlex!

Article Categories

Archives

Post Categories

.NET Framework

Blogroll

Help Authoring

Microsoft & MSDN

Setup & Deployment

Visual Basic 2005/2008/2010

Where's ByVal?

If you installed Service Pack 1 for Visual Studio 2010 and you are a VB, you might have noticed that when writing methods the ByVal keyword is no longer added for method arguments.

For instance, this code is legal:

    'Missing explicit ByVal
    Private Sub aMethod(anArgument As Integer)
    End Sub

The reason is that a method argument is ByVal by default, unless you specify ByRef. So the keyword can be omitted, but you can also add it explicitly if you prefer.

Alessandro

Print | posted on lunedì 9 maggio 2011 01:38 | Filed Under [ Visual Basic ]

Feedback

No comments posted yet.

Post Comment

Title  
Name  
Email
Url
Comment   
Please add 6 and 4 and type the answer here:

Powered by:
Powered By Subtext Powered By ASP.NET