Question

  • Thread starter Thread starter Randy
  • Start date Start date
R

Randy

Weird question about VB.Net.

In VB/VBA I know how to get UserName, IP Address and PCName - but it isn't
"easy" - there are so many function calls that need to be executed to get
this information, especially IP Address. I was talking with one of the C#
developers here at my office and he was telling me how easy it is to get
that information in C#.

How do I get this info in VB .Net?

Thanks,
Randy
 
* "Randy said:
In VB/VBA I know how to get UserName, IP Address and PCName - but it isn't
"easy" - there are so many function calls that need to be executed to get
this information, especially IP Address. I was talking with one of the C#
developers here at my office and he was telling me how easy it is to get
that information in C#.

'Environment.UserName', 'Environment.MachineName',

<URL:http://www.activevb.de/rubriken/vbdotnettipps/tipp0016.html>
 
* "Randy said:
That is the one! Just like C# - that is cool.

Does Environment.IPAddress work as well?

No, that won't work in C# too. There is no big difference between
VB.NET and C# in matters of how to solve a problem.
 
Randy said:
That is the one! Just like C# - that is cool.

Does Environment.IPAddress work as well?

No, IPAddress is not a member of the Environment class.

Forget about VB.NET and/or C# for a while. Just learn about .Net, the Common
Language Runtime, and the Framework Class Library. These things are shared
across all .Net languages, so typically whatever you can do in one language,
you can do just about the same in another. The syntax is different, and some
things might be easier in one language than another, but the framework is
always the same.
 
Back
Top