Search This Blog

Thursday, May 31, 2018

Get File Version of Process c#

c# > System.Diagnostics > Process Class > GetProcesses

GetProcesses: use this method to create an array of new Process components and associate them with all the process resources on the local computer. 

Get File Version of Process

var processes = Process.GetProcesses();

foreach (var process in processes)
{
try
{
              Console.WriteLine("Process: {0} FileVersionInfo: {1}", process.ProcessName, process.MainModule.FileVersionInfo.FileVersion);
       }
       catch
{ };
}

Friday, January 19, 2018

View Error List Visual Studio

Visual Studio -> Error List

Click View / Error List


Monday, September 25, 2017

New line in resx file Visual Studio

Visual Studio - > Resource Files

New line

  • Use Shift+Enter to insert a new line.

Wednesday, May 3, 2017

C# Concat Example

C# > String > Methods > Concat

Concatenates strings and it does not add any delimiters.

Example


string firstName = "Dan";
string lastName = "Trump";


var name = string.Concat(firstName, " ", lastName); // "Dan Trump"






Wednesday, December 14, 2016

Monday, December 5, 2016

Trailing zero numeric format string C#

C# > ToString

Examples:

1. Trailing zero numeric format string C#

"N" or "n" is for number.

  double num = 4.2;

  string result = num.ToString("N2"); // "4.20"

Wednesday, October 19, 2016

Loading symbols very slow while debugging


Loading symbols very slow while debugging


Solution

Uncheck Microsoft Symbol Servers