none
viewing the list of all .net classes in visual studio RRS feed

  • Question

  • Hi friends

    i am new to programming, so sorry for my question.

    i googled but didn't find any answer to my question:

    as we know in powershell we can work with .net classes.

    in visual studio 2013, how can i get the list of all .net framework classes?

    thanks in advanced

    Sunday, January 25, 2015 2:19 PM

Answers

  • In Visual Studio, you can use the Object Browser (choose Object Browser from the View menu). They are also all documented in the MSDN library.
    • Marked as answer by john.s2011 Sunday, January 25, 2015 3:24 PM
    Sunday, January 25, 2015 2:28 PM
  • See below


    jdweng

    • Marked as answer by john.s2011 Sunday, January 25, 2015 3:24 PM
    Sunday, January 25, 2015 2:36 PM
  • You have to browse for the following reference in the following folder

    C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Management.Automation\v4.0_3.0.0.0__31bf3856ad364e35

    Then use following

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Data;
    using System.Management.Automation;
    using System.Security;
    
    
    
    namespace ConsoleApplication1
    {
        class Program
        {
            static void Main(string[] args)
            {
                char[] password = "password".ToCharArray();
                SecureString sString = new SecureString();
                foreach(Char chr in password)
                {
                    sString.AppendChar(chr);
                }
    
    
                System.Management.Automation.PSCredential cred = new PSCredential("username", sString);
            }
    
        }
    }
    


    jdweng

    • Marked as answer by john.s2011 Sunday, January 25, 2015 8:10 PM
    Sunday, January 25, 2015 7:34 PM

All replies

  • In Visual Studio, you can use the Object Browser (choose Object Browser from the View menu). They are also all documented in the MSDN library.
    • Marked as answer by john.s2011 Sunday, January 25, 2015 3:24 PM
    Sunday, January 25, 2015 2:28 PM
  • See below


    jdweng

    • Marked as answer by john.s2011 Sunday, January 25, 2015 3:24 PM
    Sunday, January 25, 2015 2:36 PM
  • hi , thanks to both.

    but a problem:

    in powershell 4.0 we use this command:

    New-Object -typename System.Management.Automation.PSCredential

    New-Object -typename System.Management.Automation.PSCredential

    but when i tried to find this in visual studio 2013 & i expanded all items under system.management node one-by-one but i couldn't find it.

    may you show me an screenshot if it exist somewhere ?

    Sunday, January 25, 2015 3:24 PM
  • According to the documentation in the MSDN library, you need to add a reference to System.Management.Automation in your project in order to access classes in System.Management.Automation such as PSCredential.
    Sunday, January 25, 2015 4:27 PM
  • Hello john,

    this site has alos a full list of all the .NET-Classes.

    Perhaps this can help you: http://referencesource.microsoft.com/


    © 2015 Thomas Roskop

    Germany // Deutschland

    Sunday, January 25, 2015 4:36 PM
  • According to the documentation in the MSDN library, you need to add a reference to System.Management.Automation in your project in order to access classes in System.Management.Automation such as PSCredential.

    Hi thanks

    but i didn't find an step by step guide to do that ! i am completely a beginner in programming & that's difficult for me to find that.

    may you write steps in short ?

    Sunday, January 25, 2015 7:21 PM
  • You have to browse for the following reference in the following folder

    C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Management.Automation\v4.0_3.0.0.0__31bf3856ad364e35

    Then use following

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Data;
    using System.Management.Automation;
    using System.Security;
    
    
    
    namespace ConsoleApplication1
    {
        class Program
        {
            static void Main(string[] args)
            {
                char[] password = "password".ToCharArray();
                SecureString sString = new SecureString();
                foreach(Char chr in password)
                {
                    sString.AppendChar(chr);
                }
    
    
                System.Management.Automation.PSCredential cred = new PSCredential("username", sString);
            }
    
        }
    }
    


    jdweng

    • Marked as answer by john.s2011 Sunday, January 25, 2015 8:10 PM
    Sunday, January 25, 2015 7:34 PM
  • You have to browse for the following reference in the following folder

    C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Management.Automation\v4.0_3.0.0.0__31bf3856ad364e35

    Then use following

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Data;
    using System.Management.Automation;
    using System.Security;
    
    
    
    namespace ConsoleApplication1
    {
        class Program
        {
            static void Main(string[] args)
            {
                char[] password = "password".ToCharArray();
                SecureString sString = new SecureString();
                foreach(Char chr in password)
                {
                    sString.AppendChar(chr);
                }
    
    
                System.Management.Automation.PSCredential cred = new PSCredential("username", sString);
            }
    
        }
    }
    


    jdweng

    useful. Thanks

    Sunday, January 25, 2015 8:10 PM