Click here to Skip to main content
15,888,521 members
Home / Discussions / C#
   

C#

 
QuestionHow to logoff USB-Stick from WindowsXP by C#? Pin
havey00715-Feb-06 0:48
havey00715-Feb-06 0:48 
AnswerRe: How to logoff USB-Stick from WindowsXP by C#? Pin
Douglas Troy15-Feb-06 5:38
Douglas Troy15-Feb-06 5:38 
QuestionARX Tutorials needed Pin
rukmaj14-Feb-06 21:11
rukmaj14-Feb-06 21:11 
AnswerRe: ARX Tutorials needed Pin
zhok3-Jun-06 11:41
zhok3-Jun-06 11:41 
QuestionIP List Pin
krieg3814-Feb-06 20:53
krieg3814-Feb-06 20:53 
QuestionRe: IP List Pin
leppie14-Feb-06 21:07
leppie14-Feb-06 21:07 
AnswerRe: IP List Pin
krieg3814-Feb-06 21:53
krieg3814-Feb-06 21:53 
GeneralRe: IP List Pin
Dario Solera14-Feb-06 22:38
Dario Solera14-Feb-06 22:38 
Since an IP address is a 32 bit unsigned integer, you can convert the IPs into "flat" numbers, then generate all the addresses you want, then convert them into a "classic" IP address.

For example:
string[] startAddr = "127.0.0.1".Split('.');
string[] endAddr = "127.2.0.1".Split('.');

uint start = uint.Parse(startAddr[0]) +
  uint.Parse(startAddr[1]) * 256 + 
  uint.Parse(startAddr[2]) * 256 * 256 +
  uint.Parse(startAddr[3]) * 256 * 256 * 256;
uint end = ... // The same

uint[] addr = new uint[end - start];
for(int i = 0; i < addr.Length; i++) {
  addr[i] = start + i;
}

string[] result = new string[addr.Lenght];
string tmp = "";
for(int i = 0; i < result.Lenght; i++) {
   result[i] = "";
   result[i] += ((uint)(addr[i] % (256 * 256 * 256 * 256))).ToString() + ".";
   result[i] += ((uint)(addr[i] % (256 * 256 * 256))).ToString() + ".";
   result[i] += ((uint)(addr[i] % (256 * 256))).ToString() + ".";
   result[i] += ((uint)(addr[i] % (256))).ToString();
}


I don't know if this works (I didn't try it), but this is my idea. Wink | ;)

EDIT: IT DOESN'T WORK AT ALL!

___________________________________
Tozzi is right: Gaia is getting rid of us.
My Blog [ITA]


-- modified at 4:59 Wednesday 15th February, 2006
AnswerRe: IP List Pin
J4amieC15-Feb-06 0:49
J4amieC15-Feb-06 0:49 
GeneralRe: IP List Pin
krieg3815-Feb-06 17:50
krieg3815-Feb-06 17:50 
QuestionLoad an assembly dynamically in a new App Domain Pin
KaurGurpreet14-Feb-06 20:36
KaurGurpreet14-Feb-06 20:36 
AnswerRe: Load an assembly dynamically in a new App Domain Pin
CWIZO14-Feb-06 20:52
CWIZO14-Feb-06 20:52 
GeneralRe: Load an assembly dynamically in a new App Domain Pin
KaurGurpreet14-Feb-06 21:10
KaurGurpreet14-Feb-06 21:10 
GeneralRe: Load an assembly dynamically in a new App Domain Pin
CWIZO14-Feb-06 21:18
CWIZO14-Feb-06 21:18 
GeneralRe: Load an assembly dynamically in a new App Domain Pin
KaurGurpreet14-Feb-06 21:38
KaurGurpreet14-Feb-06 21:38 
AnswerRe: Load an assembly dynamically in a new App Domain Pin
leppie14-Feb-06 21:05
leppie14-Feb-06 21:05 
Questiontab Pin
fmardani14-Feb-06 19:53
fmardani14-Feb-06 19:53 
AnswerRe: tab Pin
CWIZO14-Feb-06 20:57
CWIZO14-Feb-06 20:57 
QuestionCrystal Report: indentation for text field only Pin
levik200614-Feb-06 19:45
levik200614-Feb-06 19:45 
AnswerCrystal Report: indentation for text field only Pin
levik200620-Feb-06 23:06
levik200620-Feb-06 23:06 
Questiongraphics Pin
Vineet Rajan14-Feb-06 19:20
Vineet Rajan14-Feb-06 19:20 
AnswerRe: graphics Pin
CWIZO14-Feb-06 20:57
CWIZO14-Feb-06 20:57 
Questionrunning on slow computers --> UI refreshes too slowly Pin
2hdass14-Feb-06 19:15
2hdass14-Feb-06 19:15 
AnswerRe: running on slow computers --> UI refreshes too slowly Pin
CWIZO14-Feb-06 20:59
CWIZO14-Feb-06 20:59 
QuestionPrinting Data using C# Pin
vkishan14-Feb-06 18:48
vkishan14-Feb-06 18:48 

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.