VersionInfoGetVersionString(VersionFormats, Assembly) Method

Gets a formatted String containing the specified version information for a particular Assembly.

Definition

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

Parameters

versionFormat  VersionFormats
A VersionFormats specifying which portions of the version information to display.
thisAssembly  Assembly
A Assembly object to examine.

Return Value

String
A formatted String containing version information.

Remarks

Uses the default newLineToken of 0x0D0A.

Example

C#
var versionInfo = new VersionInfo();
var versionFormat = VersionFormats.MajorMinor | VersionFormats.Copyright;
var assembly = System.Reflection.Assembly.GetExecutingAssembly();

var version = GetVersionString(versionFormat, assembly);

/*

Returns:

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

*/

See Also