Questions tagged [vb.net-2010]

The version of Visual Basic .NET used in Visual Studio/Visual Basic 2010. Use VB.NET and Visual Studio 2010 tags instead unless the question is specifically about language features added in VB.NET 2010.

The version of Visual Basic .NET used in Visual Studio/Visual Basic 2010. New features include:

  • Less-strict line continuation; for example, this syntax is allowed:

    Dim lines() As String = {
        "I am line number one",
        "and I am line number two."
    }
    
  • Auto-implemented properties. This:

    Public Property Hello() As String = "World"
    

    is compiled like this:

    Private _hello As String = "World"
    
    Public Property Hello() As String
        Get
            Return _hello
        End Get
        Set(ByVal value As String)
            _hello = value
        End Set
    End Property
    
  • Collection initializers using From:

    Dim l As New List(Of String) From {"Hello", "World"}
    
  • Multi-line lambdas:

    Call New Thread(Sub()
                        Console.WriteLine("Hello, world!")
                    End Sub).Start()
    
  • Support for dynamic types

  • Support for contravariance and covariance

The full list of changes can be found here.

2117 questions
0
votes
2 answers

I'm trying to update the data in table column "Supplier_Base.CreditBalance" with the sum of the colum "Purch" in table "Suppliers_Account"

This was what i'm trying but it does not work. UPDATE dbo.Supplier_Base SET dbo.Supplier_Base.CreditBalance ( SELECT SUM(dbo.Suppliers_Account.Purch ) AS BAL, FROM dbo.Suppliers_Account INNER JOIN dbo.Supplier_Base ON…
0
votes
0 answers

Decimal to Boolean vb.net

I have come across this bit of vb.net code: Protected Sub PremiumCalculation(grossPremiumIncldIpt As Decimal, netPremium As Decimal, ipt As Decimal, commission As Decimal) Dim needCalcGrossPrem As Boolean = grossPremiumIncldIpt =…
0
votes
1 answer

Passing of variable value from one form another

im just wondering on how can i pass value of a variable to another form from a different form I have a form called frmSearch then I have another form called frmMain from frmSearch i have a varible A which is publicly declared and i wanted the value…
Jeline Esase
  • 84
  • 1
  • 8
0
votes
1 answer

Accessing data from ms access and displaying in grid view

I am not able to display any data in grid view,Its a blank datagrid The connection is open and everything is fine but data is not getting displayed!! I am a newbie Imports System.Data.OleDb Class Form2 Private Sub Form2_Load(ByVal sender As…
jay
  • 33
  • 1
  • 9
0
votes
1 answer

Detect CapsLock Press on a webPage

How can I detect a client-side capsLock keypress...I have tried creating the following function that I wanted to launch when a key is pressed