<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How do I get Computer Name using .Net in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/how-do-i-get-computer-name-using-net/m-p/3122338#M59734</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I am trying to migrate from Vlisp to C# .Net &amp;amp; occationally struggle with simple things.&amp;nbsp;Some of my Vlisp&amp;nbsp;applications have an "about" command which shows a product info dialog similar to the default AutoCAD product info dialog. However, in C#, I am struggling with the code to obtain the Computer Name as a string. Would someone please mind showing an example of the required syntax&amp;nbsp;to retrieve the ComputerName property from WhoHasInfo (or anywhere else for that matter)&amp;nbsp;so as it can be shown in a form. See attachment which shows the existing Vlisp dialog.&lt;/P&gt;&lt;P&gt;Any help much appreciated as always.&lt;/P&gt;&lt;P&gt;AutoCAD 2009/2010 on XP Pro SP3.&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;</description>
    <pubDate>Fri, 12 Aug 2011 09:03:34 GMT</pubDate>
    <dc:creator>ezcad.co.uk</dc:creator>
    <dc:date>2011-08-12T09:03:34Z</dc:date>
    <item>
      <title>How do I get Computer Name using .Net</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-do-i-get-computer-name-using-net/m-p/3122338#M59734</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I am trying to migrate from Vlisp to C# .Net &amp;amp; occationally struggle with simple things.&amp;nbsp;Some of my Vlisp&amp;nbsp;applications have an "about" command which shows a product info dialog similar to the default AutoCAD product info dialog. However, in C#, I am struggling with the code to obtain the Computer Name as a string. Would someone please mind showing an example of the required syntax&amp;nbsp;to retrieve the ComputerName property from WhoHasInfo (or anywhere else for that matter)&amp;nbsp;so as it can be shown in a form. See attachment which shows the existing Vlisp dialog.&lt;/P&gt;&lt;P&gt;Any help much appreciated as always.&lt;/P&gt;&lt;P&gt;AutoCAD 2009/2010 on XP Pro SP3.&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;</description>
      <pubDate>Fri, 12 Aug 2011 09:03:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-do-i-get-computer-name-using-net/m-p/3122338#M59734</guid>
      <dc:creator>ezcad.co.uk</dc:creator>
      <dc:date>2011-08-12T09:03:34Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get Computer Name using .Net</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-do-i-get-computer-name-using-net/m-p/3122348#M59735</link>
      <description>&lt;P&gt;Have you looked at the System.Environment&lt;SPAN&gt;.&lt;/SPAN&gt;MachineName Property&lt;/P&gt;&lt;P&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/z8te35sa.aspx" target="_blank"&gt;http://msdn.microsoft.com/en-us/library/z8te35sa.aspx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The System.Environment class&amp;nbsp;has other information pertaing to local enviroment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;        ed.WriteMessage(Environment.MachineName);
        ed.WriteMessage(Environment.UserName);
        ed.WriteMessage(Environment.CurrentDirectory);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Aug 2011 09:20:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-do-i-get-computer-name-using-net/m-p/3122348#M59735</guid>
      <dc:creator>jeff</dc:creator>
      <dc:date>2011-08-12T09:20:20Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get Computer Name using .Net</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-do-i-get-computer-name-using-net/m-p/3122356#M59736</link>
      <description>&lt;P&gt;Thanks for your prompt reply Jeff.&lt;/P&gt;&lt;P&gt;Presumably,&amp;nbsp;﻿﻿﻿﻿﻿﻿﻿﻿﻿﻿(environment.machinename) returns a string which may then be assigned to a variable thus:&lt;/P&gt;&lt;P&gt;string compName = (environment.machinename)&lt;/P&gt;&lt;P&gt;Forgive me spelling things out like this but I do not have VS installed on the PC I am using at the moment.&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;</description>
      <pubDate>Fri, 12 Aug 2011 09:32:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-do-i-get-computer-name-using-net/m-p/3122356#M59736</guid>
      <dc:creator>ezcad.co.uk</dc:creator>
      <dc:date>2011-08-12T09:32:24Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get Computer Name using .Net</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-do-i-get-computer-name-using-net/m-p/3122360#M59737</link>
      <description>&lt;P&gt;yes sir&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Aug 2011 09:35:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-do-i-get-computer-name-using-net/m-p/3122360#M59737</guid>
      <dc:creator>jeff</dc:creator>
      <dc:date>2011-08-12T09:35:59Z</dc:date>
    </item>
  </channel>
</rss>

