سلام بر برنامه نویسان عزیز ایران زمین 😉 در این مطلب از وب سایت پروگرم 98 کد تعریف یک متد برای به کار بردن رویداد NetworkAdressChanged در سی شارپ #C را آماده کردم. امیدوارم که این کد برای شما مفید باشد.
کد تعریف یک متد برای به کار بردن رویداد NetworkAdressChanged در سی شارپ #C :
using System;
using System.Net.NetworkInformation;
class MainClass
{
private static void NetworkAddressChanged(object sender, EventArgs e)
{
Console.WriteLine("Current IP Addresses:");
foreach (NetworkInterface ni in NetworkInterface.GetAllNetworkInterfaces())
{
foreach (UnicastIPAddressInformation addr in ni.GetIPProperties().UnicastAddresses) {
using System.Net.NetworkInformation;
class MainClass
{
private static void NetworkAddressChanged(object sender, EventArgs e)
{
Console.WriteLine("Current IP Addresses:");
foreach (NetworkInterface ni in NetworkInterface.GetAllNetworkInterfaces())
{
foreach (UnicastIPAddressInformation addr in ni.GetIPProperties().UnicastAddresses) {