I want to increase my ip address and;
Here is the code
ipAddressControl1.Text = "192.168.1.255";
byte[] ip = ipAddressControl1.GetAddressBytes();
ip[3] = (byte)(++ip[3]);
IPAddress ipAddress1 = new IPAddress(ip);
MessageBox.Show(ipAddress1.ToString());
or I also tried this
ipAddressControl3.Text = "192.168.1.255";
IPAddress ipAddress1 = new IPAddress(ıpAddressControl3.GetAddressBytes());
ipAddress1.Address += 0x1 << 24;
MessageBox.Show(ipAddress1.ToString());
but both of them gives me 192.168.1.0 but I want to get value as 192.168.2.0