Click here to Skip to main content
16,004,901 members
Home / Discussions / C#
   

C#

 
GeneralRe: Converting BitArray to string Pin
Joe Rozario7-Dec-09 7:27
Joe Rozario7-Dec-09 7:27 
QuestionCPU Load of a MDI-Child Pin
DrNokill6-Dec-09 19:39
DrNokill6-Dec-09 19:39 
QuestionCustomize Quick Access Toolbar for MS Office 2007 applications Pin
Dumb Programmer6-Dec-09 18:34
Dumb Programmer6-Dec-09 18:34 
Questioncrawling a data of a website Pin
uglyeyes6-Dec-09 14:35
uglyeyes6-Dec-09 14:35 
AnswerRe: crawling a data of a website Pin
Mycroft Holmes6-Dec-09 18:48
professionalMycroft Holmes6-Dec-09 18:48 
QuestionBuiltin function for getting all ip addresses? Pin
Jacob Dixon6-Dec-09 14:23
Jacob Dixon6-Dec-09 14:23 
AnswerRe: Builtin function for getting all ip addresses? Pin
Dave Kreskowiak6-Dec-09 15:46
mveDave Kreskowiak6-Dec-09 15:46 
AnswerRe: Builtin function for getting all ip addresses? Pin
Jacob Dixon6-Dec-09 16:59
Jacob Dixon6-Dec-09 16:59 
Thanks.. first I was searching for the wrong things.. like what I was typing in.. but I got something that works for me after modifying it

static string GetRange(IPAddress address, IPAddress subnetMask)
{
    IPAddress ip = address;

    byte[] ipBytes = ip.GetAddressBytes();
    byte[] maskBytes = subnetMask.GetAddressBytes();

    byte[] startIPBytes = new byte[ipBytes.Length];
    byte[] endIPBytes = new byte[ipBytes.Length];

    for (int i = 0; i < ipBytes.Length; i++)
    {
        startIPBytes[i] = (byte)(ipBytes[i] & maskBytes[i]);
        endIPBytes[i] = (byte)(ipBytes[i] | ~maskBytes[i]);
    }

    IPAddress startIP = new IPAddress(startIPBytes);
    IPAddress endIP = new IPAddress(endIPBytes);

    return startIP.ToString() + " -- " + endIP.ToString();
}

GeneralRe: Builtin function for getting all ip addresses? Pin
Mycroft Holmes6-Dec-09 18:50
professionalMycroft Holmes6-Dec-09 18:50 
Questionget file name (only) Pin
tamir9016-Dec-09 10:22
tamir9016-Dec-09 10:22 
AnswerRe: get file name (only) Pin
Blue_Boy6-Dec-09 10:29
Blue_Boy6-Dec-09 10:29 
AnswerRe: get file name (only) Pin
PIEBALDconsult6-Dec-09 17:36
mvePIEBALDconsult6-Dec-09 17:36 
GeneralRe: get file name (only) Pin
tamir9016-Dec-09 20:49
tamir9016-Dec-09 20:49 
Question"View Code" Dropdown Pin
bailout006-Dec-09 8:11
bailout006-Dec-09 8:11 
AnswerRe: "View Code" Dropdown Pin
Saksida Bojan6-Dec-09 8:14
Saksida Bojan6-Dec-09 8:14 
GeneralRe: "View Code" Dropdown Pin
bailout006-Dec-09 9:03
bailout006-Dec-09 9:03 
GeneralRe: "View Code" Dropdown Pin
bailout006-Dec-09 9:11
bailout006-Dec-09 9:11 
GeneralRe: "View Code" Dropdown Pin
PIEBALDconsult6-Dec-09 17:39
mvePIEBALDconsult6-Dec-09 17:39 
GeneralRe: "View Code" Dropdown Pin
Dave Kreskowiak6-Dec-09 17:49
mveDave Kreskowiak6-Dec-09 17:49 
QuestionStrange Behavior: base.OnPaint [Solved] Pin
Saksida Bojan6-Dec-09 5:48
Saksida Bojan6-Dec-09 5:48 
AnswerRe: Strange Behavior: base.OnPaint [Solved] Pin
Shameel6-Dec-09 23:14
professionalShameel6-Dec-09 23:14 
QuestionSerialization Pin
hadad6-Dec-09 4:26
hadad6-Dec-09 4:26 
AnswerRe: Serialization Pin
Natza Mitzi6-Dec-09 10:02
Natza Mitzi6-Dec-09 10:02 
QuestionDataGridview Drag and drop visualization Pin
anishkannan6-Dec-09 4:25
anishkannan6-Dec-09 4:25 
AnswerRe: DataGridview Drag and drop visualization Pin
Mycroft Holmes6-Dec-09 13:40
professionalMycroft Holmes6-Dec-09 13:40 

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.