private void AddSubsequentlyString(IntPtr head)
        {
            IntPtr intPtr = head;

            while (intPtr != IntPtr.Zero)
            {
                Win32_IP_ADDR_STRING win32_IP_ADDR_STRING = (Win32_IP_ADDR_STRING)Marshal.PtrToStructure(intPtr, typeof(Win32_IP_ADDR_STRING));
                Add(IPAddress.Parse(win32_IP_ADDR_STRING.IpAddress));
                intPtr = win32_IP_ADDR_STRING.Next;
            }
        }
        private void AddSubsequently(IntPtr head)
        {
            IntPtr intPtr = head;

            while (intPtr != IntPtr.Zero)
            {
                Win32_IP_ADDR_STRING win32_IP_ADDR_STRING = (Win32_IP_ADDR_STRING)Marshal.PtrToStructure(intPtr, typeof(Win32_IP_ADDR_STRING));
                this.Add(new GatewayIPAddressInformationImpl(IPAddress.Parse(win32_IP_ADDR_STRING.IpAddress)));
                intPtr = win32_IP_ADDR_STRING.Next;
            }
        }
 public Win32IPAddressCollection(params Win32_IP_ADDR_STRING[] al)
 {
     for (int i = 0; i < al.Length; i++)
     {
         Win32_IP_ADDR_STRING win32_IP_ADDR_STRING = al[i];
         if (!string.IsNullOrEmpty(win32_IP_ADDR_STRING.IpAddress))
         {
             Add(IPAddress.Parse(win32_IP_ADDR_STRING.IpAddress));
             AddSubsequentlyString(win32_IP_ADDR_STRING.Next);
         }
     }
     is_readonly = true;
 }