Table of Contents

TryParse Method

Definition

TryParse(string, out string)

Attempts to parse the specified frameworkNameOrTargetFrameworkMoniker into its short target framework moniker representation.

public static bool TryParse(string frameworkNameOrTargetFrameworkMoniker, out string targetFrameworkMoniker)

Parameters

frameworkNameOrTargetFrameworkMoniker string

The framework name or target framework moniker to parse.

targetFrameworkMoniker string

When this method returns, contains the parsed target framework moniker, or null if frameworkNameOrTargetFrameworkMoniker could not be parsed as a supported target framework moniker.

Returns

bool

true if frameworkNameOrTargetFrameworkMoniker was parsed successfully; otherwise, false.

TryParse(FrameworkName, out string)

Attempts to parse the specified frameworkName into its short target framework moniker representation.

public static bool TryParse(FrameworkName frameworkName, out string targetFrameworkMoniker)

Parameters

frameworkName FrameworkName

The FrameworkName to parse.

targetFrameworkMoniker string

When this method returns, contains the parsed target framework moniker, or null if frameworkName could not be parsed as a supported target framework moniker.

Returns

bool

true if frameworkName was parsed successfully; otherwise, false.