473,804 Members | 2,931 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to multiply this??

Why do we have to use decimal.multipl y to multiply two intgers?
I just want to multiply these two values:

int oneThousand = 1000;
int watCHTimer1 = value from a textbox;

Thanks,
Trint

Nov 17 '05 #1
4 7248
Trint!
Your posts are getting more and more stupid every day!
Try learning the language before trying to code (I hope you are not getting
paid for your "programmin g"! - I would like to see such a silly company that
pays such a "programmer " as you) Have you ever considered trying before
posting? This newsgroup is full of your dumb questions

Integer multiplication is done vie the awesome '*' operator

int trintsResult = 1000 * parsedValue;

Decimal.Multipl y is used when we are multiplying two decimals.
I suggest you to try these great sites:
www.google.com
http://msdn.microsoft.com/
"trint" <tr***********@ gmail.com> wrote in message
news:11******** **************@ l41g2000cwc.goo glegroups.com.. .
Why do we have to use decimal.multipl y to multiply two intgers?
I just want to multiply these two values:

int oneThousand = 1000;
int watCHTimer1 = value from a textbox;

Thanks,
Trint


Nov 17 '05 #2
I knew that, but I keep getting an error in my app.
And you didn't have to respond if you were going to be rude.

..Net programmer
tr***********@g mail.com

*** Sent via Developersdex http://www.developersdex.com ***
Nov 17 '05 #3
Hi Trint,

Try to convert the value from your textbox first

int YourValue = 5;
int TextValue = Convert.ToInt32 (txtTextBox.Tex t);
or
int TextValue = ((IConvertible) txtTextBox.Text ).ToInt32(null) ;

int Result = YourValue * TextValue;

Cheers
Salva

"Trint Smith" wrote:
I knew that, but I keep getting an error in my app.
And you didn't have to respond if you were going to be rude.

.Net programmer
tr***********@g mail.com

*** Sent via Developersdex http://www.developersdex.com ***

Nov 17 '05 #4
I had to respond because your questions are very, very often on this group
and most of the time, you are posting before trying to think about your
problem, before trying to find a solution and before using the debugger!
Try to google for an article "how to ask and get answers"

"Trint Smith" <tr***********@ gmail.com> wrote in message
news:%2******** ********@TK2MSF TNGP14.phx.gbl. ..
I knew that, but I keep getting an error in my app.
And you didn't have to respond if you were going to be rude.

Net programmer
tr***********@g mail.com

*** Sent via Developersdex http://www.developersdex.com ***

Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2395
by: Zhang Le | last post by:
Hi, I did a small benchmark of matrix-vector multiply operation using Numeric module. I'm a bit suprised to find matrix*col-vector is much faster than row-vector*matrix. I wonder whether other people have observed this fact too, and why? Below is the code I used, with output from my machine. python bench.py running 1000 iterations of matrix multiply of row 1000-vector
2
3098
by: Martin Pettersson | last post by:
Hi all, I'm trying to multiply parent values in xsl. The thing is that I start with a value down in the xml-structure. From that value (in my case 'qty' value) I check the parent value and later on I will try to multiply these values. When I have found the parent I will multiply with its parent and so on, all the way to the top of the xml-file. The files are pasted below. First I have tried to find these values, the next step will be...
15
13283
by: christopher diggins | last post by:
Here is some code I wrote for Matrix multiplication for arbitrary dimensionality known at compile-time. I am curious how practical it is. For instance, is it common to know the dimensionality of matricies at compile-time? Any help would be appreciated. Hopefully this code comes in useful for someone, let me know if you find it useful, or if you have suggestions on how to improve it. // Public Domain by Christopher Diggins, 2005 ...
3
4646
by: Dave | last post by:
Hello all, Please consider this code: #ifndef FOO_INCLUDED #define FOO_INCLUDED // File: foo.h class foo {
11
2538
by: vips | last post by:
I have a string str="10*12*14" now I want the total of this value i.e. 10 multiply 12 multiply 14 how do i get it ? is there any function in vb.net to do that ?? if i put it as query to database I get the result, but I want to do it in the code.
0
4002
by: komandjaja | last post by:
Hi everybody. I am new here and I don't know much about CSS. However, I have a blog at multiply http://komandjaja.multiply.com and I have customized the CSS codes there to make a new theme. When I see my page thru Firefox, everything is okay but when I see it with IE, there are distorted things and some pictures don't show up. My platform is Windows XP home edition. Here's my css code to the site /************* Spiderman 3...
12
2101
by: Janaka Perera | last post by:
Hi All, We have done a object oriented design for a system which will create a class multiply inherited by around 1000 small and medium sized classes. I would be greatful if you can help me with the following: Can this create any problems with GNU g++ compilation, linking etc? What would be the impact to the performance of the system? Anything else we have to consider?
14
5175
by: Default User | last post by:
Hi, If I have three 64 bit integers and I want to do this operation on them: x*y/z Lets say that what we are multiplying by (y) is offset by what we are dividing by (z) so that the final answer will fit in a 64-bit integer. Let me simplify it by using unsigned chars (8 bits):
1
1993
by: Gavin Chen | last post by:
Hello: I tried to install Tk800.015 on SunOS 4.1.4 with perl 5.6.2. At "make test" time, I got the error message as below: collect2: ld returned 2 exit status ld: /usr/local/lib/perl5/site_perl/5.6.2/sun4-sunos/auto/Tk/Event/Event.a(Event.o): _LangExit: multiply defined ld: /usr/local/lib/perl5/site_perl/5.6.2/sun4-sunos/auto/Tk/Event/Event.a(Event.o): _Tcl_Free: multiply defined ld:...
0
10569
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10325
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10075
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7615
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5519
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4295
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3815
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2990
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.