Click or drag to resize

VersionInfoGetVersionString(VersionFormats, Assembly, String) Method

Gets a formatted String containing the specified version information for a particular Assembly using a specific newline string.

Namespace: InnerDrive.Core
Assembly: InnerDrive.Core (in InnerDrive.Core.dll) Version: 5.0.8475.0
Syntax
C#
public string GetVersionString(
	VersionFormats versionFormat,
	Assembly thisAssembly,
	string newLineToken
)

Parameters

versionFormat  VersionFormats
A VersionFormats specifying which portions of the version information to display.
thisAssembly  Assembly
An Assembly to examine.
newLineToken  String
A string to use as a newline delineation.

Return Value

String
A formatted String containing version information.
Exceptions
ExceptionCondition
ArgumentNullExceptionThrown if thisAssembly is null.
Example
C#
var versionInfo = new VersionInfo();
var versionFormat = VersionFormats.MajorMinor | VersionFormats.Copyright;
var newLineToken = "<br />";

var assembly = System.Reflection.Assembly.GetExecutingAssembly();

var version = GetVersionString(versionFormat, assembly, newLineToken);

/*

Returns:

"4.2<br />Copyright ©2022 Inner Drive Technology. All rights 
reserved. Portions Copyright ©1986-2022 David Braverman."

.*/
See Also