Re: possible to use Bang ! notation in place of "Not" keyword?
- From: "Herfried K. Wagner [MVP]" <hirf-spam-me-here@xxxxxx>
- Date: Sat, 28 Apr 2007 23:26:18 +0200
"Rich" <Rich@xxxxxxxxxxxxxxxxxxxxxxxxx> schrieb:
If Not st1.Equals("something") then
Do Something Else
End If
if str1 != "something" Then ...
I realize that != is C# stuff and/or can be also be used in Tsql, but is
there any implementation of bang ! in VB.Net? Just checking. Any samples
appreciated.
Note that C# overloads the '==' and '!=' operators so that they work with both value types and reference types. Thus it's not obious if value equality or object identity is compared. Other programming languages, such as VB, provide different operators for comparing (1) value equality and (2) object identity.
In VB, the operators '=' and '<>' are used to compare for value equality and 'Is' and 'IsNot' (VB 2005) are used to compare for object identity.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
.
- Prev by Date: Re: Get file's associated application / app icon
- Next by Date: Re: How does WebRequest work?
- Previous by thread: Re: possible to use Bang ! notation in place of "Not" keyword?
- Next by thread: Calling PageSetupDialog from a PrintPreviewDialog
- Index(es):
Relevant Pages
|