Click here to Skip to main content
15,890,506 members
Home / Discussions / C#
   

C#

 
GeneralError Finding right SqlCollation !! Pin
MasudM10-Mar-04 20:23
MasudM10-Mar-04 20:23 
GeneralRe: Error Finding right SqlCollation !! Pin
Heath Stewart11-Mar-04 4:00
protectorHeath Stewart11-Mar-04 4:00 
GeneralRe: Error Finding right SqlCollation !! Pin
MasudM11-Mar-04 4:31
MasudM11-Mar-04 4:31 
GeneralDynamically-created assemblies from run-time compiled code Pin
Nathan Ridley10-Mar-04 19:28
Nathan Ridley10-Mar-04 19:28 
GeneralRe: Dynamically-created assemblies from run-time compiled code Pin
Nathan Ridley10-Mar-04 19:52
Nathan Ridley10-Mar-04 19:52 
GeneralUsing C# controls in MFC Pin
Jain Mohit10-Mar-04 18:49
Jain Mohit10-Mar-04 18:49 
GeneralRe: Using C# controls in MFC Pin
Heath Stewart11-Mar-04 3:53
protectorHeath Stewart11-Mar-04 3:53 
GeneralSimple calculation problem with decimal value drivin me NUTS!!!! Pin
ASGill10-Mar-04 18:11
ASGill10-Mar-04 18:11 
im trying to multiply some numbers num1 is a normal integer,(1,2,3....) and num2 is a decimal number(0.23,1.00,3.00....) im having problems multiplying them, i've done it different ways sometimes i get a 0 in the total textbox or this error : Input String was not in a correct format. Can somebody help me out to rectify this problem.

<br />
if(Pharma.Rows.Count != 0)<br />
					{<br />
						string Tablet = (string) Pharma.Rows[0][0];<br />
<br />
						decimal num2 = Convert.ToDecimal(Tablet);<br />
<br />
						MessageBox.Show(num2.ToString()); //0.23<br />
<br />
						int num3 = Convert.ToInt32(num2);<br />
<br />
						int num1 = Int32.Parse(txtQuantity.Text);<br />
<br />
						MessageBox.Show(num1.ToString()); //12<br />
<br />
						total = num1 * num3;<br />
<br />
						decimal total1 = Convert.ToDecimal(total);<br />
<br />
						MessageBox.Show(total.ToString()); //2.76<br />
<br />
						txtMedTotal.Text = total.ToString();<br />
					}<br />
					else<br />
					{<br />
						MessageBox.Show("The Patient has yet to be processed","Information");<br />
					}<br />
<br />
<br />


this code is givin me back a result of 0...when it should be 2.76



D'Oh! | :doh: D'Oh! | :doh: D'Oh! | :doh: im three times confused now!
GeneralRe: Simple calculation problem with decimal value drivin me NUTS!!!! Pin
MasudM10-Mar-04 20:15
MasudM10-Mar-04 20:15 
GeneralAn object as property in property panel Pin
Den2Fly10-Mar-04 17:08
Den2Fly10-Mar-04 17:08 
GeneralRe: An object as property in property panel Pin
Heath Stewart11-Mar-04 3:38
protectorHeath Stewart11-Mar-04 3:38 
QuestionHow to convert windows media player to be a web control? Pin
Marveyles10-Mar-04 17:02
Marveyles10-Mar-04 17:02 
AnswerRe: How to convert windows media player to be a web control? Pin
Heath Stewart11-Mar-04 3:31
protectorHeath Stewart11-Mar-04 3:31 
GeneralRe: How to convert windows media player to be a web control? Pin
Marveyles11-Mar-04 15:04
Marveyles11-Mar-04 15:04 
GeneralRe: How to convert windows media player to be a web control? Pin
Heath Stewart12-Mar-04 2:35
protectorHeath Stewart12-Mar-04 2:35 
GeneralRe: How to convert windows media player to be a web control? Pin
Marveyles14-Mar-04 13:19
Marveyles14-Mar-04 13:19 
GeneralRe: How to convert windows media player to be a web control? Pin
Heath Stewart15-Mar-04 3:17
protectorHeath Stewart15-Mar-04 3:17 
GeneralRe: How to convert windows media player to be a web control? Pin
Marveyles15-Mar-04 12:59
Marveyles15-Mar-04 12:59 
GeneralRe: How to convert windows media player to be a web control? Pin
Heath Stewart15-Mar-04 13:28
protectorHeath Stewart15-Mar-04 13:28 
GeneralRe: How to convert windows media player to be a web control? Pin
Marveyles16-Mar-04 12:02
Marveyles16-Mar-04 12:02 
GeneralRe: How to convert windows media player to be a web control? Pin
Heath Stewart17-Mar-04 2:49
protectorHeath Stewart17-Mar-04 2:49 
GeneralRe: How to convert windows media player to be a web control? Pin
Marveyles17-Mar-04 12:44
Marveyles17-Mar-04 12:44 
GeneralRe: How to convert windows media player to be a web control? Pin
Heath Stewart20-Mar-04 12:53
protectorHeath Stewart20-Mar-04 12:53 
Generalnet use in dos mode Pin
Rob Tomson10-Mar-04 14:16
Rob Tomson10-Mar-04 14:16 
GeneralRe: net use in dos mode Pin
Heath Stewart11-Mar-04 3:05
protectorHeath Stewart11-Mar-04 3:05 

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.