Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -836,11 +836,6 @@ void DisplayIPv4NetworkInterfaces()

// Try to get the IPv4 interface properties.
IPv4InterfaceProperties ^ p = adapterProperties->GetIPv4Properties();
if ( !p )
{
Console::WriteLine( "No IPv4 information is available for this interface." );
continue;
}

// Display the IPv4 specific data.
Console::WriteLine( " Index ............................. : {0}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -796,12 +796,6 @@ public static void DisplayIPv4NetworkInterfaces()
// Try to get the IPv4 interface properties.
IPv4InterfaceProperties p = adapterProperties.GetIPv4Properties();

if (p == null)
{
Console.WriteLine("No IPv4 information is available for this interface.");
Console.WriteLine();
continue;
}
// Display the IPv4 specific data.
Console.WriteLine(" Index ............................. : {0}", p.Index);
Console.WriteLine(" MTU ............................... : {0}", p.Mtu);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -695,11 +695,7 @@ Public Class NetworkingExample
Dim adapterProperties As IPInterfaceProperties = adapter.GetIPProperties()
' Try to get the IPv4 interface properties.
Dim p As IPv4InterfaceProperties = adapterProperties.GetIPv4Properties()

If p Is Nothing Then
Console.WriteLine("No IPv4 information is available for this interface.")
GoTo ContinueForEach1
End If

' Display the IPv4 specific data.
Console.WriteLine(" Index ............................. : {0}", p.Index)
Console.WriteLine(" MTU ............................... : {0}", p.Mtu)
Expand Down
6 changes: 4 additions & 2 deletions xml/System.Net.NetworkInformation/IPInterfaceProperties.xml
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,8 @@

## Remarks
For a detailed description of the information available for an interface that supports IPv4, see the <xref:System.Net.NetworkInformation.IPv4InterfaceProperties> class documentation. Note that the object returned by the <xref:System.Net.NetworkInformation.IPInterfaceProperties.GetIPv4Properties%2A> method reflects the configuration as of the time the object is created. This information is not updated dynamically.

A <xref:System.Net.NetworkInformation.NetworkInformationException> is thrown if the interface does not support the IPv4 protocol, therefore it's recommended to check IPv4 support calling <xref:System.Net.NetworkInformation.NetworkInterface.Supports%2A> on the originating <xref:System.Net.NetworkInformation.NetworkInterface> instance before querying the IPv4 properties.

]]></format>
</remarks>
<exception cref="T:System.Net.NetworkInformation.NetworkInformationException">The interface does not support the IPv4 protocol.</exception>
Expand Down Expand Up @@ -544,7 +545,8 @@

## Remarks
For a detailed description of the information available for an interface that supports IPv6, see the <xref:System.Net.NetworkInformation.IPv6InterfaceProperties> documentation. Note that the object returned by the <xref:System.Net.NetworkInformation.IPInterfaceProperties.GetIPv6Properties%2A> method reflects the configuration as of the time the object is created. This information is not updated dynamically.

A <xref:System.Net.NetworkInformation.NetworkInformationException> is thrown if the interface does not support the IPv6 protocol, therefore it's recommended to check IPv6 support calling <xref:System.Net.NetworkInformation.NetworkInterface.Supports%2A> on the originating <xref:System.Net.NetworkInformation.NetworkInterface> instance before querying the IPv6 properties.

]]></format>
</remarks>
<exception cref="T:System.Net.NetworkInformation.NetworkInformationException">The interface does not support the IPv6 protocol.</exception>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<format type="text/markdown"><![CDATA[

## Remarks
You can apply this attribute to assemblies, although the [Tlbimp.exe (Type Library Importer)](/dotnet/framework/tools/tlbimp-exe-type-library-importer) typically applies it for you when it a type library.
You can apply this attribute to assemblies, although the [Tlbimp.exe (Type Library Importer)](/dotnet/framework/tools/tlbimp-exe-type-library-importer) typically applies it for you when it imports a type library.

The primary use of the attribute is to capture the original source of the type information. For example, you can import A.tlb as an interop assembly called A.dll and have assembly B.dll reference A.dll. When you export B.dll to B.tlb, this attribute causes the references in B.tlb that point to A.dll to point instead to A.tlb. This should not be confused with the <xref:System.Runtime.InteropServices.ComImportAttribute>, which specifies that an individual type is implemented in COM.

Expand Down