Search This Blog

Tuesday, September 23, 2014

Configure Jenkins to use Mercurial

Jenkins > Mercurial 

Mercurial Plugin: Install the Jenkins Mercurial Plugin first (read more https://wiki.jenkins-ci.org/display/JENKINS/Mercurial+Plugin)



Source Code Management: Configure for Mercurial













Reduce unnecessary builds by specifying a comma or space delimited list of "modules" within the repository. A module is a directory name within the repository that this project lives.




To do that press advanced button:

This will detect changes only in sdks subdirectory in src directory:


Wednesday, September 17, 2014

Environment UserName property C# example

C#  > System > Environment ClassUserName

UserName is used to identify the user on the current thread, the user name of the person who is logged on to Windows.

Example



  string user = Environment.UserName;





SetEnvironmentVariable C# Example

C#  > System > Environment ClassSetEnvironmentVariable

SetEnvironmentVariable creates, modifies, or deletes an environment variable. 


Example



Environment.SetEnvironmentVariable("VisualStudioVersion", "10.0");





Environment Class C#

C#  > System > Environment Class

Environment class is used to retrieve/change information about environment variable settings, command line arguments, call stack.


Methods:
Properties:





Wednesday, September 10, 2014

Delete directory C#

C# > Files > Directory > Delete

Deletes the specified directory.

Example

Deletes the specified directory and any subdirectories and 

files in the directory.


System.IO.Directory.Delete(@"c:\Temp\", true);







Friday, August 29, 2014

How to get if is Runtime or Design Mode VB.net

VB.NET > Control > DesignMode

DesignMode returns true is a control is being used in the context of a designer. 

Example:

If Me.DesignMode Then
      Return
End If





Tuesday, August 12, 2014

Typeof C# example

C# > Keywords > typeof

Obtains the System.Type object for a type.


Example:



Type type = typeof(T);