Click here to Skip to main content
15,918,889 members
Home / Discussions / C#
   

C#

 
GeneralTCP/IP Pin
Expert Coming11-Jul-05 18:01
Expert Coming11-Jul-05 18:01 
GeneralRe: TCP/IP Pin
Expert Coming11-Jul-05 21:48
Expert Coming11-Jul-05 21:48 
Generalnew thread for new form Pin
wdahl9911-Jul-05 17:15
wdahl9911-Jul-05 17:15 
GeneralRe: new thread for new form Pin
S. Senthil Kumar11-Jul-05 17:54
S. Senthil Kumar11-Jul-05 17:54 
GeneralCapture the xp Logon and Logoff event Pin
aocraft11-Jul-05 17:12
aocraft11-Jul-05 17:12 
GeneralRe: Capture the xp Logon and Logoff event Pin
KaptinKrunch11-Jul-05 17:32
KaptinKrunch11-Jul-05 17:32 
GeneralRe: Capture the xp Logon and Logoff event Pin
aocraft11-Jul-05 17:56
aocraft11-Jul-05 17:56 
Questionif statements with a string? Pin
Anonymous11-Jul-05 16:25
Anonymous11-Jul-05 16:25 
I'm trying to take a numeric value from a textBox and compare it against another numeric value that is supplied by the app, but i'm stuk trying to convert the string value of the textBox1.Text to int value for the if statement, i keep recieveing the following errors:
Cannot implicitly convert type 'string' to 'bool'
Cannot implicitly convert type 'int' to 'string'

here is the code:

private void button1_Click(object sender, System.EventArgs e)
		{
	string myID;
		TextBox txtbx = new TextBox();
			txtbx.Text = myID; 
			if (myID = 123)
				MessageBox.Show("You are right");
			
		}

I've tried changing the string myID to int myID but it hasn't proven any better, as i get the same errors listed above with int to bool, and int to string as the only difference.

also i'm getting a slightly less important error of:
Use of unassigned local variable 'myID' which i understand means i haven't initiated the variable, but its failing inside the if statement.
I'm still learning so if you guys could help it would be great.
thanks
Confused | :confused: newbie
AnswerRe: if statements with a string? Pin
Weiye Chen11-Jul-05 16:50
Weiye Chen11-Jul-05 16:50 
GeneralRe: if statements with a string? Pin
Anonymous11-Jul-05 17:14
Anonymous11-Jul-05 17:14 
GeneralRe: if statements with a string? Pin
Weiye Chen11-Jul-05 17:34
Weiye Chen11-Jul-05 17:34 
AnswerRe: if statements with a string? Pin
User 209307311-Jul-05 22:17
User 209307311-Jul-05 22:17 
AnswerRe: if statements with a string? Pin
sayinsinan12-Jul-05 3:42
sayinsinan12-Jul-05 3:42 
GeneralC# DatePicker Pin
epfuller11-Jul-05 15:41
epfuller11-Jul-05 15:41 
GeneralRe: C# DatePicker Pin
Christian Graus11-Jul-05 17:02
protectorChristian Graus11-Jul-05 17:02 
GeneralAdding a scrollbar to a panel Pin
Ruskin Dantra11-Jul-05 12:33
Ruskin Dantra11-Jul-05 12:33 
GeneralRe: Adding a scrollbar to a panel Pin
bneacetp11-Jul-05 14:17
bneacetp11-Jul-05 14:17 
QuestionEvents when Deleting Tree View Nodes? Pin
McClamm11-Jul-05 12:18
McClamm11-Jul-05 12:18 
GeneralUse HttpWebRequest To send POST HTTP request to a web server Pin
surfman1911-Jul-05 11:56
surfman1911-Jul-05 11:56 
GeneralRe: Use HttpWebRequest To send POST HTTP request to a web server Pin
Guffa11-Jul-05 14:31
Guffa11-Jul-05 14:31 
GeneralRe: Use HttpWebRequest To send POST HTTP request to a web server Pin
surfman1913-Jul-05 6:10
surfman1913-Jul-05 6:10 
QuestionDataGrid cell to span two columns? Pin
TERACytEX11-Jul-05 11:40
TERACytEX11-Jul-05 11:40 
AnswerRe: DataGrid cell to span two columns? Pin
TERACytEX11-Jul-05 14:19
TERACytEX11-Jul-05 14:19 
QuestionHmm. Could this be easyer? Pin
Anthony Mushrow11-Jul-05 10:37
professionalAnthony Mushrow11-Jul-05 10:37 
AnswerRe: Hmm. Could this be easyer? Pin
DavidNohejl11-Jul-05 10:52
DavidNohejl11-Jul-05 10:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.