Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the meaning of ! in the code?

Tags:

.net

vb.net

I'm a newbie in programming and visual basic 2008 language.

I'm learning to use sqlite database in visual basic 2008, and I got the following tutorial code. The code is working correctly and my question is: what is the meaning of that ! mark in the code. Please point to me where to get more information as I wish to learn more about that. I have Windows Sdk v6.1 installed.

Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
    Dim DatabaseFilepath As String = "e:\sqlite.db3"

    Dim SQLconnect As New System.Data.SQLite.SQLiteConnection()
    Dim SQLcommand As System.Data.SQLite.SQLiteCommand

    SQLconnect.ConnectionString = "Data Source=" & DatabaseFilepath & ";"
    SQLconnect.Open()

    SQLcommand = SQLconnect.CreateCommand

    Dim SchemaTable = SQLconnect.GetSchema(System.Data.SQLite.SQLiteMetaDataCollectionNames.Tables)

    For int As Integer = 0 To SchemaTable.Rows.Count - 1
        If SchemaTable.Rows(int)!TABLE_TYPE.ToString = "table" Then
            MessageBox.Show(SchemaTable.Rows(int)!TABLE_NAME.ToString())
        End If
    Next

    SQLcommand.Dispose()
    SQLconnect.Close()
End Sub

UPDATE:

Can anyone tell me what is the alternative for that bang operator in the code ? That bang operator looks unusual.

like image 726
Sean Avatar asked Apr 13 '11 09:04

Sean


People also ask

What is the meaning of in coding?

A Simple Definition. Coding is the process of transforming ideas, solutions, and instructions into the language that the computer can understand – that is, binary-machine code.

What does code mean in slang?

Technically, there's no formal definition for a code, but doctors often use the term as slang for a cardiopulmonary arrest happening to a patient in a hospital or clinic, requiring a team of providers (sometimes called a code team) to rush to the specific location and begin immediate resuscitative efforts.

What is code number meaning?

code number in British English (kəʊd ˈnʌmbə ) a number used to identify something.

What is code example?

Code (short for source code) is a term used to describe text that is written using the protocol of a particular language by a computer programmer. Examples of programming languages include C, C#, C++, Java, Perl, and PHP.


1 Answers

Its called the Bang Operator.

It means, use the default property of this type.

It was very common in VB6 code, used to access the fields of a Recordset and avoid trouble with field names that were also a keyword. An alternative to the dot operator and [brackets]. The bang still works:

value = row!column1

instead of

value = row("column1")

Consider it a typing aid, use at your discretion.

like image 54
Jodrell Avatar answered Oct 23 '22 10:10

Jodrell