I can't find a Mod or remainder function in .net. Does anyone know if these
fuctions exist?
--
Thanks in advance,
Todd 5 94265
On Wed, 20 Oct 2004 11:27:07 -0700, Todd wrote: I can't find a Mod or remainder function in .net. Does anyone know if these fuctions exist?
Did you look in the MSDN help? I started it up, selected the index and
typed Mod in the combo and lo and behold, there was the topic for the Mod
operator!! Amazing!
In brief:
A = 8 Mod 3
--
Chris
dunawayc[AT]sbcglobal_lunchmeat_[DOT]net
To send me an E-mail, remove the "[", "]", underscores ,lunchmeat, and
replace certain words in my E-Mail address.
<Chris Dunaway <"dunawayc[[at]_lunchmeat_sbcglobal[dot]]net">> wrote: On Wed, 20 Oct 2004 11:27:07 -0700, Todd wrote:
I can't find a Mod or remainder function in .net. Does anyone know if these fuctions exist?
Did you look in the MSDN help? I started it up, selected the index and typed Mod in the combo and lo and behold, there was the topic for the Mod operator!! Amazing!
In brief:
A = 8 Mod 3
That doesn't look like C# to me (see subject line).
In C#, the remainder operator is %:
int a = 8 % 3; // a=2
There's also the Math.DivRem method, which allows you to get both the
quotient and remainder parts of a division operation in one go.
--
Jon Skeet - <sk***@pobox.com> http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Thanks but i am looking for the answer using C#. That doesn't work in C#.
"Chris Dunaway" <"dunawayc[[at]_lunchmeat" wrote: On Wed, 20 Oct 2004 11:27:07 -0700, Todd wrote:
I can't find a Mod or remainder function in .net. Does anyone know if these fuctions exist?
Did you look in the MSDN help? I started it up, selected the index and typed Mod in the combo and lo and behold, there was the topic for the Mod operator!! Amazing!
In brief:
A = 8 Mod 3
-- Chris
dunawayc[AT]sbcglobal_lunchmeat_[DOT]net
To send me an E-mail, remove the "[", "]", underscores ,lunchmeat, and replace certain words in my E-Mail address.
On Wed, 20 Oct 2004 20:49:29 +0100, Jon Skeet [C# MVP] wrote: That doesn't look like C# to me (see subject line).
Oops! I guess I need to read too!
--
Chris
dunawayc[AT]sbcglobal_lunchmeat_[DOT]net
To send me an E-mail, remove the "[", "]", underscores ,lunchmeat, and
replace certain words in my E-Mail address.
On Wed, 20 Oct 2004 12:53:04 -0700, Todd wrote: Thanks but i am looking for the answer using C#.
My apologies, I did not read carefully enough.
--
Chris
dunawayc[AT]sbcglobal_lunchmeat_[DOT]net
To send me an E-mail, remove the "[", "]", underscores ,lunchmeat, and
replace certain words in my E-Mail address. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Luis |
last post by:
can you look at my code, and tell
my wy the section of the client program which says :
const Fraction f3(12, 8);
const Fraction f4(202, 303);
result = f3.MultipliedBy(f4);
cout << "The product...
|
by: Michael Sgier |
last post by:
Hello
If someone could explain the code below to me would be great.
// return angle between two vectors
const float inline Angle(const CVector& normal) const
{
return acosf(*this % normal);
}...
|
by: tienlx |
last post by:
Hi all, i'm sorry about my poor English ( it isn't my native language).
I confused the order which the function in C be evaluted in for()
function ? Ex:
i have 3 functions : a() b() and c()
and...
|
by: gh |
last post by:
I am dividing var1 by var2 and I want to check and see if there is a
remainder. How do I do this in C#?
TIA
|
by: Todd |
last post by:
I can't find a Mod or remainder function in .net. Does anyone know if these
fuctions exist?
--
Thanks in advance,
Todd
|
by: nessuno |
last post by:
I can't find any discussion of this question in this NG.
I'd like to implement some variable precision integer arithmetic in C,
and do it efficiently. A problem arises with the divide/remainder...
|
by: Martin Jørgensen |
last post by:
Hi,
Problem:
========
Some of my output functions are beginning to take pretty many
arguments... I mean.... We're talking about 10-15 arguments :-)
So I thought to myself, perhaps this is...
|
by: amitpatel66 |
last post by:
All,
Please find below POST about Oracle SINGLE ROW FUNCTIONS which might be useful.
SINGLE ROW FUNCTION are those which are executed once for each and every row of the Query.
The different...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
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,...
|
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...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
| |