don't understand this  -  System.Nullable(Of Integer))

Posted on 2006-03-30
Last Modified: 2006-11-18

I have a function automatically created for me by visual studio. the function includes this parameter

  ByRef JobID As System.Nullable(Of Integer))

This parameter is given a value during the function that i need to access. I don't understand what System.Nullable(Of Integer)) means

Please can you show me how i declare a variable that i can pass into this function and how i can then access its value

what does the system.nullable mean?

Thanks a lot
Question by:andieje
    1 Comment
    LVL 14

    Accepted Solution

    It's a brilliant feature:

    it will allow you to check if a value is nothing which never really worked for value types like integer

    So you can e.g. create a sub like

    Public sub testing (testVal as System.Nullable(integer))

    'try to see if it has a value
    if testVal.HasValue then ("so happy")
    end if

    end sub

    call your sub like:
    testing (nothing)
    or testing (1)

    in your sub you can get the value like

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    I'm currently working for a company where I have to upgrade over 50 VB6 programs to VB.NET 2008.  So far I'm about half way through, and I've learned quite a few tricks that drastically improve the performance of VB.NET apps. Because there are a…
    This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now