mscorlib(4.0.0.0) API with additions
PingOptions.cs
2 {
4  public class PingOptions
5  {
6  private const int DontFragmentFlag = 2;
7 
8  private int ttl = 128;
9 
10  private bool dontFragment;
11 
15  public int Ttl
16  {
17  get
18  {
19  return ttl;
20  }
21  set
22  {
23  if (value <= 0)
24  {
25  throw new ArgumentOutOfRangeException("value");
26  }
27  ttl = value;
28  }
29  }
30 
34  public bool DontFragment
35  {
36  get
37  {
38  return dontFragment;
39  }
40  set
41  {
42  dontFragment = value;
43  }
44  }
45 
46  internal PingOptions(IPOptions options)
47  {
48  ttl = options.ttl;
49  dontFragment = (((options.flags & 2) > 0) ? true : false);
50  }
51 
58  public PingOptions(int ttl, bool dontFragment)
59  {
60  if (ttl <= 0)
61  {
62  throw new ArgumentOutOfRangeException("ttl");
63  }
64  this.ttl = ttl;
65  this.dontFragment = dontFragment;
66  }
67 
69  public PingOptions()
70  {
71  }
72  }
73 }
int Ttl
Gets or sets the number of routing nodes that can forward the T:System.Net.NetworkInformation....
Definition: PingOptions.cs:16
bool DontFragment
Gets or sets a T:System.Boolean value that controls fragmentation of the data sent to the remote host...
Definition: PingOptions.cs:35
Used to control how T:System.Net.NetworkInformation.Ping data packets are transmitted.
Definition: PingOptions.cs:4
The exception that is thrown when the value of an argument is outside the allowable range of values a...
PingOptions(int ttl, bool dontFragment)
Initializes a new instance of the T:System.Net.NetworkInformation.PingOptions class and sets the Time...
Definition: PingOptions.cs:58
PingOptions()
Initializes a new instance of the T:System.Net.NetworkInformation.PingOptions class.
Definition: PingOptions.cs:69