先谢谢 大家的帮助 c#很菜的问题
namespace A
{
CLASS B
{
string hostName = Dns.GetHostName();
IPHostEntry ipEntry = Dns.GetHostEntry(hostName);
strIpAdd = ipEntry.AddressList[0].ToString();
}
}
USING A.B;
namespace C
{
CLASS D
{
//想在这里使用 strIpAdd 怎么办 以下可以吗?
**************************************
/// B b = new B();
///b.strIpAdd ;
**************************************
//应该怎么做好呢?谢谢帮忙啊~
}
}
{
CLASS B
{
string hostName = Dns.GetHostName();
IPHostEntry ipEntry = Dns.GetHostEntry(hostName);
strIpAdd = ipEntry.AddressList[0].ToString();
}
}
USING A.B;
namespace C
{
CLASS D
{
//想在这里使用 strIpAdd 怎么办 以下可以吗?
**************************************
/// B b = new B();
///b.strIpAdd ;
**************************************
//应该怎么做好呢?谢谢帮忙啊~
}
}
...全文


