Archive for the ‘C#’ Category

4 Coding tips

No Comments » by Jon Hibbins on 26 August 2009
Filed under: .NET, C#, Code, Java, Objective-C, PHP, Quick Tips, Software Development

1: Delete It !
If a chunk of code comment or class is not used, don’t comment it out, just delete it.

2: Write clear code.
“make sure you document code that’s hard to understand”. Question: why is the code hard to understand?

3: Comment
Comments can indeed be useful but mostly as a summary of action

4: Don’t Repeat Yourself
Duplication is bad. If you have more than 4-5 lines of code that do the same thing in a single class, refactor to remove duplication.

SVN Port TCP Port is 3690

1 Comment » by Jon Hibbins on 12 February 2009
Filed under: .NET, C#, Code, OSX, Platform, Quick Tips, Software Development, Unix/Linux, Windows

If you need to access SVN remotely, by default it runs on port TCP port 3690, so you need to make sure it is open in your firewall etc.

C# Tip:Start an application from a C# program

No Comments » by Jon Hibbins on 3 August 2008
Filed under: .NET, C#, Code, MSSQL2005, Software Development

Useful code if you wish to launch an external application:

System.Diagnostics.Process.Start(@"C:\program files\microsoft office\word.exe", @"C:\MyWordDocument.docx");