harddisk number,CPU number and IP address

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Nagarjuna502
    New Member
    • Nov 2007
    • 7

    harddisk number,CPU number and IP address

    Hai,
    I am having 3 questions,
    1.How To find harddisk number in C#
    2.How To find CPU number in C#
    3.How to find IP address of the system in C#
    where we are working.
  • kunal pawar
    Contributor
    • Oct 2007
    • 297

    #2
    Do u know Envionmental Variable ??

    These System.Net.envi ronment Variable
    [code=vbnet]
    Dim h As System.Net.IPHo stEntry = Dns.GetHostByNa me(System.Net.D ns.GetHostName)
    sMachineName = Environment.Mac hineName.ToStri ng
    Dim sUserName = Environment.Use rName
    Dim sIPAddress = (CType(h.Addres sList.GetValue( 0), IPAddress).ToSt ring)
    sHostName = Dns.GetHostName ()
    [/code]
    Environment.Cur rentDirectory
    etc....
    Last edited by Frinavale; Nov 16 '07, 02:58 PM. Reason: Added [code] tags

    Comment

    • Plater
      Recognized Expert Expert
      • Apr 2007
      • 7872

      #3
      WMI can be used to get all of those things as well.

      Comment

      • Frinavale
        Recognized Expert Expert
        • Oct 2006
        • 9749

        #4
        Originally posted by Nagarjuna502
        Hai,
        I am having 3 questions,
        1.How To find harddisk number in C#
        2.How To find CPU number in C#
        3.How to find IP address of the system in C#
        where we are working.
        For the HardDrive number, take a look at the System.IO.Drive Info Class.

        Comment

        Working...