blah blah blah is here! blah blah » Close

1
votes
9 answers

ASP.NET Message Box, Replace "Message from webpage" to some other string

in ASP.NET, say we have some code something like this: protected void RasinBread_Button_Click(object sender, EventArgs e) { if (GlobalClass.RemainingStock() == 3) { Response.Write(&q ...

0
votes
2 answers

C# Database Connection String for Server

MySqlConnection myConn = new MySqlConnection("server=192.168.1.103;database=productcatalog;uid=root;password=12345678"); // where 192.168.1.103 is the PC's IP address. above code does not give me any problem. but when I have ...

1
votes
1 answers

Or comparision on strings.

I want to check whether a a person has entered "y" or "Y" on a console screen. I'm trying to use: string answer; do { Console.WriteLine("Please enter the actors name"); tempActorList.Add(Con ...

2
votes
1 answers

style and efficiency question: arrays versus List<generic>

I find that I practically never use arrays anymore because of the potential waste of memory from having to declare arrays more than large enough. Another reason is because arrays look old fashioned to me. List<> seems to have largel ...

0
votes
2 answers

style question: String versus string, null versus double quote double quote

Question: If I use string should I compare it to null or ""? Does the answer change if I use String?

1
votes
1 answers

C# TextBox values to x string array

I have a textbox with the following values : 4,5,6,7,8,9,10,11,12,13,15 I want these values to be split into `x` string arrays with `y` values in each array. For example extract into 3 arrays with 4 numbers in each : int x = 3; str ...

1
votes
1 answers

Formatting a string to a output in a decimal format

Hi, I have a program that calculates the average of three test scores. The test scores are entered into text boxes, I convert the text to uint and the result into a double. I then am converting the final result back into a string to disp ...

2
votes
2 answers

Converting a string to respective enum value

This may be an obvious question, but: How do you convert a string representation of an enum value in to the respective value? For example: [code] public enum TestEnum : byte { FirstValue = 1, SecondValue = 2 } static void ...

0
votes
6 answers

Storing byte[] value

Hi all, In my project, at one point, I get the result in byte[], which I change to string to display in further textboxes. I can also store the same in the database too. My question is, is it possible to work directly on the returned ...

0
votes
1 answers

Convert String from HEX to DEC to ASCII.

I need to have this conversion, from HEX to DEC to ASCII. or if possible, direct conversion from HEX to ASCII. e.g input string = 01344583 (HEX) intermediate string = 20202883 (DEC) string abc = "01344583"; int def = i ...

1
votes
1 answers

String to Form

I am trying to make an application where there is a textbox and what you type in the box is the name of the form that shows, does anyone know how to convert strings into forms in Visual C#?

1
votes
1 answers

Variable not Setting (With Tic Tac Toe!)

MPQC
15

Well. Basically, I've got a variable, named "Turn". Turn is a string, which is either equal to "x", or "o". (Yes, it's a game of tic tac toes. ;D). So, the problem. Basically, the program is structured like thi ...

0
votes
1 answers

Displaying double value in Textbox

Following is the code: private void button1_Click(object sender, EventArgs e) { Globals.Turbo.GetPosition(Globals.device_number, 1, 0, out Globals.motorPos); X_Encoder_Pos.Text = Global ...

Feedback