Ignore sign?

darklight

Member
Joined
May 3, 2007
Messages
18
Programming Experience
1-3
Is there an ignore sign? I don't want it commented i'm trying to add ' but it will comment it. Heres what i'm trying to do:

VB.NET:
[SIZE=2]TextBox2.Text = ([/SIZE][SIZE=2][COLOR=#a31515]"function"[/COLOR][/SIZE][SIZE=2] & [/SIZE][SIZE=2][COLOR=#a31515]" "[/COLOR][/SIZE][SIZE=2] & TextBox3.Text & [/SIZE][SIZE=2][COLOR=#a31515]"() { commandtoserver(""'messageSent', & """[/COLOR][/SIZE][SIZE=2] & TextBox1.Text & [/SIZE][SIZE=2][COLOR=#a31515]");}"[/COLOR][/SIZE][SIZE=2])
[/SIZE]
 
ok, i'm teaching myself. string.format. Whats wrong here?

VB.NET:
test.Text = String.Format("function {0}() {1} { {1} ", test2.Text, vbCrLf)
 
I noticed in a recent thread that MsgBox is preferred to MessageBox.Show according to msdn's coding convention.

Quote the Microsoft document that makes this recommendation? MsgBox is a legacy function, not core to .NET (it is not present in C#, C++/CLI or J# without referencing the Microsoft.VisualBasic dll), that wraps the .NET function MessageBox.Show purely for copy-and-paste compatibility to old VB6 code, and to give old programmers a way to code without making the language overbearingly hard..

As a legacy function, tied to an inconsisent and rather ugly programming language that VB.NET is attempting to clean up, I can only recommend that the programmers using it update their thinking and move on.
 
Quote the Microsoft document that makes this recommendation? MsgBox is a legacy function, not core to .NET (it is not present in C#, C++/CLI or J# without referencing the Microsoft.VisualBasic dll), that wraps the .NET function MessageBox.Show purely for copy-and-paste compatibility to old VB6 code, and to give old programmers a way to code without making the language overbearingly hard..

As a legacy function, tied to an inconsisent and rather ugly programming language that VB.NET is attempting to clean up, I can only recommend that the programmers using it update their thinking and move on.


http://msdn2.microsoft.com/en-us/library/h63fsef3(VS.80).aspx
it simply says to use MsgBox instead of MessageBox.Show, no reason given

Use MsgBox instead of MessageBox.Show or Console.WriteLine.
 
I can see quite a few contradictory advices in there. Good effort, Microsoft ;)

Some of it seems aimed at keeping VB coders coding in VB6 style, even though they have moved onto a completely different language.. I've explained my reason for not using MsgBox, I guess it's for you to take your choice now ;) The link was an interesting read, thanks!
 
Last edited:
Help with this please?

Conversion from string "klol" to type 'Boolean' is not valid.

VB.NET:
[SIZE=2][COLOR=#0000ff]
If[/COLOR][/SIZE][SIZE=2] txtUsername.Text = System.Convert.ToString(Username) & txtPassword.Text = System.Convert.ToString(Password) [/SIZE][SIZE=2][COLOR=#0000ff]Then
[/COLOR][/SIZE]
 
Back
Top