Share via


Connection.FrameworkVersions Property

Definition

Gets the .NET Framework versions in the active management session.

public:
 property System::Collections::ObjectModel::ReadOnlyCollection<Microsoft::Web::Management::Server::ManagementFrameworkVersion ^> ^ FrameworkVersions { System::Collections::ObjectModel::ReadOnlyCollection<Microsoft::Web::Management::Server::ManagementFrameworkVersion ^> ^ get(); };
public System.Collections.ObjectModel.ReadOnlyCollection<Microsoft.Web.Management.Server.ManagementFrameworkVersion> FrameworkVersions { get; }
member this.FrameworkVersions : System.Collections.ObjectModel.ReadOnlyCollection<Microsoft.Web.Management.Server.ManagementFrameworkVersion>
Public ReadOnly Property FrameworkVersions As ReadOnlyCollection(Of ManagementFrameworkVersion)

Property Value

A ICollection interface that contains all the .NET Framework versions in the active management session. Each ICollection element contains a ManagementFrameworkVersion object.

Examples

public LinkedList<string> getFrameworkVers(IServiceProvider sp) {
    Connection con = (Connection)sp.GetService(typeof(Connection));
    System.Collections.ICollection fcol = con.FrameworkVersions;
    LinkedList<string> llp = new LinkedList<string>();

    foreach (object o in fcol) {
        Microsoft.Web.Management.Server.ManagementFrameworkVersion mf = (Microsoft.Web.Management.Server.ManagementFrameworkVersion)o;
        llp.AddLast(mf.Version.ToString() + " Name: " + mf.Name);
    }

    return llp;
}

Applies to