|
The VB.Net keyword And
is equivalent to the C# operator &
The VB.Net keyword AndAlso is equivalent to the C# operator &&
The VB.Net keyword Or is equivalent to the C# operator |
The VB.Net keyword OrElse is equivalent to the C# operator ||
The subliminal message is RTM[^]?
|
|
|
|
|
Duncan Edwards Jones wrote: The subliminal message is RTM[^]?
Nope. IMHO default behaviour should be short-cut and the keywords AndAlso , OrElse are simply foolish, hence my subliminal still stands.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Right.
Read The Fantastic Manual.
Apparently no one does anymore, even asking Google seems too much for some.
|
|
|
|
|
Luc Pattyn wrote: Google seems too much for some
Seems like it.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
As a minor semantic difference - the & operator in C# is a bitwise and, whereas && is the logical and which also shortcircuits. (Like C++)
I'm used to using & with caution - coming from a C++ background - you could have two "true" results from a function - but 1 & 2 == false In C# this cautioning really doesnt apply though.
|
|
|
|
|
There is no semantic difference.
The following are *exactly* equivalent:
VB: C#:
And &
Or |
AndAlso &&
OrElse ||
The VB 'And' is *both* a bitwise operator and a non-short-circuiting logical operator, as is the C# '&' operator. Ditto for 'Or' and '|'.
They produce identical results when used in the same situations.
Obviously, it usually makes sense to use 'AndAlso' and 'OrElse' in most logical evaluation situations, but occasionally 'And' and 'Or' may be preferred, in exactly the same cases where '&' and '|' may be preferred in C#.
David Anton
http://www.tangiblesoftwaresolutions.com
C++ to C# Converter
C++ to VB Converter
C++ to Java Converter
VB to Java Converter
Java to VB & C# Converter
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: convert VB, C#, or Java to C++/CLI
|
|
|
|
|
Hi All!
I Am Using Visual Studio 2005 .NET Standard Edition and I have run into (Yet Another)
HUGE Problem.
My MenuStrip Isn't Working.
It's inside a tabcontrol near the bottom of my form and isn't my forms main MenuStrip, when my
app starts, as if by magic, all menustripitems on the control dissappear! Leaving an empty menustrip!
It's really been bugging me, i've tried refreshing it, toggline it's visibility and everything.
nothing Seems to work.
Any Help Would really be appreiciated!
MrWolfy
|
|
|
|
|
Hey Everybody I Solved it!
The Bug itself seems to be extremely difficult, if not impossible to fix BUT by simply docking the
toolstripcontainer and menustrip inside a panel everything works fine!
It seems that the tabcontrol and the toolstripcontainer and/or menustrip don't mix well, but hey,
the panel method works, and works well!
Thanks!
MrWolfy
|
|
|
|
|
Dang... It's Just Dissappeared Again
I thought i had it but i didn't.
And it's driving me MAD
Somebody please help me, it's been haunting me ever since i first bought VS 2005!
Thanks.
MrWolfy
|
|
|
|
|
First off, you should not have anything in a tabcontrol except for tabpages. If the menu is in a tabpage then their shouldn't be any problem.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios
Discounted or Free Software for Students:
DreamSpark - downloads.channel8.msdn.com
MSDN Academic Alliance - www.msdnaa.com
|
|
|
|
|
how can i prevent my data not to overlap when printing it...i am using vb.net...hope you could help me...thanks
|
|
|
|
|
read the sticky at the top of the forum 'need help' is not a valid subject, everyone who posts, needs help.
If you write good print code, it won't overlap. Hard to say more without seeing code.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hi,
i'm using VS2008 working on v.net windows application, here i dont know how to show my textbox display backward.. i mean if i enter '12345' then the textbox will display '54321'.. plz help and guide me..
thanx..
|
|
|
|
|
You could try to write a custom control to do that. Good luck, it won't be trivial.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
|
Vinay Srivastava wrote: Dim temp(10) As String
Doesn't this create an array with 10 strings ? what if there's more than 10 chars in the string ? why create an array of strings and not chars ? This is very bad code.
I also don't see how it helps, he didn't ask to flip the string, but for it to show backwards, in general use, I assumed.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Try this code
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
TextBox1.Text = e.KeyChar & sender.text
e.KeyChar = Nothing
End Sub
some more validations has to be add as per your requirement.
Thanks
Rajesh B
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
yeah, this is a start. The cases to watch are, where is the cursor ? What happens if the user uses the arrows ? What if they press delete ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
@ Christian Graus
If u observe my answer,
very first line i wrote
" Try this code" : that means am not giving conformation it will 100% works. and am not giving 100% Solution. am just giving a suggestion.
and last line i wrote,
" some more validations has to be added......"
that mean Programs has to add his default validations like u wrote
"The cases to watch are, where is the cursor ? What happens if the user uses the arrows ? What if they press delete ? "
====================================
here is the code
If Char.IsLetterOrDigit(e.KeyChar) Then
TextBox1.Text = e.KeyChar & sender.text
e.KeyChar = Nothing
End If
Thanks
Rajesh B
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
Yes, I saw what you said, I was not contradicting you. I was more adding to it, if he wants to build on your code, I was being more specific. You said 'some more validations...' and you were right. I was suggesting what some of those may need to be.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hello
How i can change the color of the selected item in a listbox ?
Thanks in advance
Assaf
modified on Sunday, June 22, 2008 6:53 PM
|
|
|
|
|
Hi,
you can draw the listbox items yourself when you modify DrawMode and provide
a DrawItem handler. That way you are fully in charge of position, size, color, whatever.
|
|
|
|
|
Hi!
I Need to check javascript in a richtextbox for errors at the click of a button,
I know that this is no small task, and every attempt I can think of or have tried
just loops through the textbox, highlighting and checking each and every word
and repeating this time and time again for every single function or method used.
It is Ridiculously Slow.
Is there an engine or perhaps some code out there that will allow me to do this reasonably
Quickly?
Thanks!
MrWolfy
|
|
|
|
|
Hi,
I would suggest you forget about the RTB and check the JavaScript in memory;
only touch the RTB (if you must) when there is something to report.
|
|
|
|
|
Thanks!
That helps a lot, but i still can't seem to figure out just how to check the javascript for
errors accurately, any advice?
Thanks Again!
MrWolfy
|
|
|
|