Csharp/CSharp Tutorial/File Directory Stream/FileVersionInfo — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 12:20, 26 мая 2010
FileVersionInfo: IsDebug, IsPatched, IsPreRelease, IsPrivateBuild, IsSpecialBuild
using System;
using System.Diagnostics;
static class MainClass
{
static void Main(string[] args)
{
FileVersionInfo info = FileVersionInfo.GetVersionInfo("c:\\test.txt");
// Display version information.
Console.WriteLine("Checking File: " + info.FileName);
Console.WriteLine("IsDebug: " + info.IsDebug);
Console.WriteLine("IsPatched: " + info.IsPatched);
Console.WriteLine("IsPreRelease: " + info.IsPreRelease);
Console.WriteLine("IsPrivateBuild: " + info.IsPrivateBuild);
Console.WriteLine("IsSpecialBuild: " + info.IsSpecialBuild);
}
}
Checking File: c:\test.txt IsDebug: False IsPatched: False IsPreRelease: False IsPrivateBuild: False IsSpecialBuild: False
FileVersionInfo: Product Name, Product Version, Company Name
using System;
using System.Diagnostics;
static class MainClass
{
static void Main(string[] args)
{
FileVersionInfo info = FileVersionInfo.GetVersionInfo("c:\\test.txt");
// Display version information.
Console.WriteLine("Checking File: " + info.FileName);
Console.WriteLine("Product Name: " + info.ProductName);
Console.WriteLine("Product Version: " + info.ProductVersion);
Console.WriteLine("Company Name: " + info.rupanyName);
}
}
Checking File: c:\test.txt Product Name: Product Version: Company Name:
FileVersionInfo: Version, Description, Original Filename, Legal Copyright, InternalName
using System;
using System.Diagnostics;
static class MainClass
{
static void Main(string[] args)
{
FileVersionInfo info = FileVersionInfo.GetVersionInfo("c:\\test.txt");
// Display version information.
Console.WriteLine("Checking File: " + info.FileName);
Console.WriteLine("File Version: " + info.FileVersion);
Console.WriteLine("File Description: " + info.FileDescription);
Console.WriteLine("Original Filename: " + info.OriginalFilename);
Console.WriteLine("Legal Copyright: " + info.LegalCopyright);
Console.WriteLine("InternalName: " + info.InternalName);
}
}
Checking File: c:\test.txt File Version: File Description: Original Filename: Legal Copyright: InternalName: