NetCoreCount Property

Applies to TestComplete 15.40, last modified on July 05, 2022

Description

Different versions of Microsoft .NET Framework common language runtimes (CLRs) can be installed on the current computer. The OSInfo.NetCoreCount property returns the number of different CLR versions installed.

Declaration

OSInfoObj.NetCoreCount

Read-Only Property Integer
OSInfoObj An expression, variable or parameter that specifies a reference to an OSInfo object

Applies To

The property is applied to the following object:

Property Value

The number of different versions of Microsoft .NET Framework CLRs available on the current computer.

Example

The following example posts all the versions of Microsoft .NET Framework installed on the local computer.

JavaScript, JScript

function TestProc()
{
  var inf, i;
  inf = Sys.OSInfo;
  for (i = 0; i < inf.NetCoreCount; i++)
  {
    Log.Message( inf.NetCoreVersion( i ) );
  }
}

Python

def TestProc():
  inf = Sys.OSInfo
  for i in range (0, inf.NetCoreCount - 1):
    Log.Message( inf.NetCoreVersion( i ) )

VBScript

Sub TestProc
  Set inf = Sys.OSInfo
  For i = 0 To inf.NetCoreCount - 1
     Log.Message inf.NetCoreVersion( i )
  Next
End Sub

DelphiScript

procedure TestProc;
var
  inf : OleVariant;
  i : integer;
begin
  inf:=Sys.OSInfo;
  for i:=0 to inf.NetCoreCount - 1 do
  begin
    Log.Message( inf.NetCoreVersion( i ) );
  end;
end;

C++Script, C#Script

function TestProc()
{
  var inf, i;
  inf = Sys.OSInfo;
  for (i = 0; i < inf["NetCoreCount"]; i++)
  {
    Log["Message"]( inf["NetCoreVersion"]( i ) );
  }
}

See Also

OSInfo.NetCoreVersion

Highlight search results