Click here to Skip to main content
15,916,693 members
Home / Discussions / C#
   

C#

 
GeneralRe: Events.... Pin
s211197923-Mar-05 22:31
s211197923-Mar-05 22:31 
GeneralRe: Events.... Pin
ABBASI_RA4-Mar-05 3:12
ABBASI_RA4-Mar-05 3:12 
GeneralTrying to Programmatically Modify DataSet-databound Control Pin
Newbie_T3-Mar-05 16:19
Newbie_T3-Mar-05 16:19 
GeneralThread Pausing & Timer Pin
Bob Bonser3-Mar-05 16:13
Bob Bonser3-Mar-05 16:13 
GeneralRe: Thread Pausing & Timer Pin
Stefan Troschuetz3-Mar-05 21:34
Stefan Troschuetz3-Mar-05 21:34 
GeneralRe: Thread Pausing & Timer Pin
James Poulose4-Mar-05 1:40
James Poulose4-Mar-05 1:40 
QuestionNetwork Broadcasting. How? Pin
Roman Rodov3-Mar-05 16:07
Roman Rodov3-Mar-05 16:07 
AnswerRe: Network Broadcasting. How? Pin
Sebastian Schneider3-Mar-05 22:38
Sebastian Schneider3-Mar-05 22:38 
OK, this is how subnetting works:

An IP-Address is 32 Bit long. The first part determines the Network, the second part identifies the Host.

Your network class is C, which means: the first 24 Bit are Network, the last 8 Bit are host. Subnet-Mask is 255.255.255.0 (which means exactly the same: all bits set to 1 are part of the Network-ID, the bits set to 0 are part of the Host-ID. There never are any 0s between 1s, so its always ...11111000... and NEVER ...110110000... etc.)

What is that subnet-mask good for, if the network-class already contains the necessary information?

That is VERY simple:

Using an IP-Address from ANY Network and the corresponding subnet mask, you can easily derive the broadcast-address of that network.

Your code doesnt work cause IPAddress.Broadcast is 255.255.255.255 (which means "EVERY ADDRESS ON ALL NETWORKS" and is probably filtered by your L3-switches or routers).

Try the following:

If you need to contact all hosts in the 192.168.8.0 Network, use a bitwise-or of one host-address (e.g. 192.168.8.4) and the inverted subnet-mask (e.g. 0.0.0.255). That will return the broadcast-address of the network (in this case, 192.168.8.255).

If you need to calculate the Network-Address, use a bitwise-and instead and dont invert the subnet-mask.

Remember the following:

The first address in a subnet always is the Network Address, the last address always is the Broadcast.

If you are not using CIDR, the following is true:

Subnetmask for Class-A Networks: 255.0.0.0
Subnetmask for Class-B Networks: 255.255.0.0
Subnetmask for Class-C Networks: 255.255.255.0

Cheers
Sid
AnswerRe: Network Broadcasting. How? Pin
leppie3-Mar-05 23:46
leppie3-Mar-05 23:46 
GeneralRelease unmanaged code memory by managed code Pin
ting6683-Mar-05 15:25
ting6683-Mar-05 15:25 
GeneralRe: Release unmanaged code memory by managed code Pin
Roman Rodov3-Mar-05 16:18
Roman Rodov3-Mar-05 16:18 
GeneralClient/Server COM+ Application Pin
Wender Oliveira3-Mar-05 14:56
Wender Oliveira3-Mar-05 14:56 
QuestionHow to know if a place holder is empty Pin
see073-Mar-05 13:11
see073-Mar-05 13:11 
AnswerRe: How to know if a place holder is empty Pin
Rob Graham3-Mar-05 15:28
Rob Graham3-Mar-05 15:28 
GeneralRe: How to know if a place holder is empty Pin
see074-Mar-05 9:28
see074-Mar-05 9:28 
Generalsorting datagrid with empty rows Pin
Mc Fetto3-Mar-05 9:32
Mc Fetto3-Mar-05 9:32 
GeneralSelection Color Pin
Radgar3-Mar-05 7:39
Radgar3-Mar-05 7:39 
GeneralCalculations on Dataset Urgent Please help Pin
nishant.gogia3-Mar-05 7:37
nishant.gogia3-Mar-05 7:37 
GeneralRe: Calculations on Dataset Urgent Please help Pin
Kodanda Pani3-Mar-05 16:17
Kodanda Pani3-Mar-05 16:17 
GeneralRe: Calculations on Dataset Urgent Please help Pin
nishant.gogia3-Mar-05 17:07
nishant.gogia3-Mar-05 17:07 
GeneralProblems when going from framework 1.1 to 2.0 beta Pin
Talal Sultan3-Mar-05 7:23
Talal Sultan3-Mar-05 7:23 
GeneralRe: Problems when going from framework 1.1 to 2.0 beta Pin
Judah Gabriel Himango3-Mar-05 7:55
sponsorJudah Gabriel Himango3-Mar-05 7:55 
GeneralRe: Problems when going from framework 1.1 to 2.0 beta Pin
Talal Sultan3-Mar-05 11:24
Talal Sultan3-Mar-05 11:24 
GeneralRe: Problems when going from framework 1.1 to 2.0 beta Pin
S. Senthil Kumar3-Mar-05 7:59
S. Senthil Kumar3-Mar-05 7:59 
GeneralRe: Problems when going from framework 1.1 to 2.0 beta Pin
Talal Sultan3-Mar-05 11:30
Talal Sultan3-Mar-05 11:30 

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.