For example i need:
123.123.123.1
123.123.123.2
....
123.123.123.256
-------------------------------------------
I write code:
This code work, but he is long and I now, is short function, ant that function do same like this my long code.
Maybe some now? :]
123.123.123.1
123.123.123.2
....
123.123.123.256
-------------------------------------------
I write code:
Code:
for (int i = 0; i < IPadresas.Length; i++) { IPad_cut[i] = IPadresas[i]; if (IPad_cut[i] == '.') { dotCOUNT++; } if (dotCOUNT == limit) { break; } saveLong = i; } saveLong = saveLong + 2; Char[] IPad_cut2 = new Char[saveLong]; //New Char, cut IP address for (int i = 0; i < saveLong; i++) { IPad_cut2[i] = IPad_cut[i]; } String adresoPradzia = new String(IPad_cut2);// String, cut IP Address 123.213.123. String NewIP; for (int i = 0; i < 256; i++) { IPAddress ip = IPAddress.Parse(NewIP); //New IP 123.123.123.+1, 123.123.123+2.....
This code work, but he is long and I now, is short function, ant that function do same like this my long code.
Maybe some now? :]
Comment