473,387 Members | 1,611 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

C# Ping ?

JC
I have this code from a site,
http://www.csharphelp.com/archives3/archive554.html
I can't figure out what the
set{ m_Timeout = MinMax.max(value, 1);
does. Compiling fails on the MinMax object. What is it?

jc
Nov 16 '05 #1
5 3154
JC,

Try this

set
{
m_Timeout = System.Math.Max(value,1);
}

I donno wat is MinMax. May be a custom class. Its getting max of two values
in this case.

Shak.
"JC" <st**********@hotmail.com> wrote in message
news:O2**************@TK2MSFTNGP12.phx.gbl...
I have this code from a site,
http://www.csharphelp.com/archives3/archive554.html
I can't figure out what the
set{ m_Timeout = MinMax.max(value, 1);
does. Compiling fails on the MinMax object. What is it?

jc

Nov 16 '05 #2
Wouldn't it be nice if you both learned how to use documentation?
Both Min and Max are members of the Math class [1].

--
<%= Clinton Gallagher
A/E/C Consulting, Web Design, e-Commerce Software Development
Wauwatosa, Milwaukee County, Wisconsin USA
NET csgallagher@ REMOVETHISTEXT metromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/
[1]
http://msdn.microsoft.com/library/de...mberstopic.asp

"Shakir Hussain" <sh**@fakedomain.com> wrote in message
news:ee**************@TK2MSFTNGP12.phx.gbl...
JC,

Try this

set
{
m_Timeout = System.Math.Max(value,1);
}

I donno wat is MinMax. May be a custom class. Its getting max of two values
in this case.

Shak.
"JC" <st**********@hotmail.com> wrote in message
news:O2**************@TK2MSFTNGP12.phx.gbl...
I have this code from a site,
http://www.csharphelp.com/archives3/archive554.html
I can't figure out what the
set{ m_Timeout = MinMax.max(value, 1);
does. Compiling fails on the MinMax object. What is it?

jc


Nov 16 '05 #3
clinton,

In the following code JC was wondering abt MinMax class becoz it doesnt
compile for him.

MinMax.max(value, 1)

Can you pay attention to the questions next time? This is not the place to
make fun of others. Share your knowledge and help others if you can :).

Shak.
"clintonG" <csgallagher@RE************@metromilwaukee.com> wrote in message
news:#j**************@tk2msftngp13.phx.gbl...
Wouldn't it be nice if you both learned how to use documentation?
Both Min and Max are members of the Math class [1].

--
<%= Clinton Gallagher
A/E/C Consulting, Web Design, e-Commerce Software Development
Wauwatosa, Milwaukee County, Wisconsin USA
NET csgallagher@ REMOVETHISTEXT metromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/
[1]
http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfsystemmathmemberstopic.asp
"Shakir Hussain" <sh**@fakedomain.com> wrote in message
news:ee**************@TK2MSFTNGP12.phx.gbl...
JC,

Try this

set
{
m_Timeout = System.Math.Max(value,1);
}

I donno wat is MinMax. May be a custom class. Its getting max of two values in this case.

Shak.
"JC" <st**********@hotmail.com> wrote in message
news:O2**************@TK2MSFTNGP12.phx.gbl...
I have this code from a site,
http://www.csharphelp.com/archives3/archive554.html
I can't figure out what the
set{ m_Timeout = MinMax.max(value, 1);
does. Compiling fails on the MinMax object. What is it?

jc



Nov 16 '05 #4
It is unfortunate, on that particular site, that there is no way to offer
feedback to the author. Apparently, the author was using his own
"utilities" that included functions that he wrote for minimum and maximum.
I'm sure you can use the Max function in the System.Math namespace instead,
or just write your own.

Good Luck,
--- Nick

P.S. Don't let the critics get you down.

"JC" <st**********@hotmail.com> wrote in message
news:O2**************@TK2MSFTNGP12.phx.gbl...
I have this code from a site,
http://www.csharphelp.com/archives3/archive554.html
I can't figure out what the
set{ m_Timeout = MinMax.max(value, 1);
does. Compiling fails on the MinMax object. What is it?

jc

Nov 16 '05 #5
Here is one I did that does not require admin perms and is contained in one
cs file. See Attachment. hth

--
William Stacey, MVP

"JC" <st**********@hotmail.com> wrote in message
news:O2**************@TK2MSFTNGP12.phx.gbl...
I have this code from a site,
http://www.csharphelp.com/archives3/archive554.html
I can't figure out what the
set{ m_Timeout = MinMax.max(value, 1);
does. Compiling fails on the MinMax object. What is it?

jc


Nov 16 '05 #6

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

Similar topics

3
by: Jason Rodman | last post by:
I have downloaded every example on how to create a ping utility in .Net in both VB and C#, but have been disappointed with the results. I have YET to find an example that returns consistent results...
9
by: Mantorok | last post by:
Hi all I want to ping an ipaddress/host to check for a response. Is there any easy way in C#/.Net to do this? Thanks Kev
2
by: Eric Wenger | last post by:
I'm pretty new to C# and I'm trying to do what I believe should be a simple thing. I want to modify a program that is using the System.Net.NetworkInformation.Ping class to have some custom...
0
by: Ed | last post by:
I've attached some VB.NET code I've hacked together (some taken from MS examples & newsgroup postings) that will perform a ping or IcmpSendEcho using the icmp.dll (see this for more info:...
0
by: scotty | last post by:
I need to do a ping scan of a subnet. I can Enum through the IPs and do this, but it takes over 5 minutes as I can only create 1 process at a time. Does anyone know how I can create multiple Ping...
21
by: Neel | last post by:
I am trying to "ping" a remote host in my C++/Redhat Linux code to check whether that host is connected or not. if (0 == system("ping -w 2 192.168.0.2)) But, in both cases...
5
by: Deepak | last post by:
I am programing a ping application which pings various centers . I used timer loop and it pings one by one. Now when i finish pinging one center it should wait for the ping_completed function to...
1
by: Krish | last post by:
All, I have an offline application that works online for some data syncronization. For data syncronization I access a webservice. I want to show whether my application is online or not by checking...
3
by: imughal | last post by:
I got the perl script which does following task. This solution reads in a line from a text file that is passed in as input parameter 1 to a Perl script. This script will then ping the machine...
6
by: Dave Marden | last post by:
I currently use this routine in vbscript to ping computers and get the status of ping to determine whether to try to backup a machine, I am trying to change it to work with vb2003.net I am...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
0
marktang
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,...
0
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...
0
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,...
0
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...

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.