Jun 04
I program with different languages and for a while now I have wanted to make the K&R variant coding style my default in Visual Studio.
So what do I mean by the K&R variant coding style, this coding style was named after co authors of the book The C Programming Language (thank you Wikipedia!) Kernighan and Ritchie. The variant I like is based on Java – rather than taking up a new line I like the opening brace on the first line of the statement block.
Continue reading »
Tagged with: Allman style • C# • K&R Coding Style Variant • MVC 2.0 • Visual Studio 2008 • Visual Studio 2010 • yam
Nov 11
In VB.NET you have always been able to use optional parameters:
Sub Foo(ByVal p1 As String, Optional ByVal p2 As String = "default value")
End Sub
'Call to Foo with 1 of the 2 parameters is allowed
Foo("p1 value")
Now in C# 4.0 we get the same support:
void Foo(string p1, string p2 = "default value")
{
}
//Call to Foo with 1 of the 2 parameters is allowed
Foo("p1 value");
Continue reading »
Tagged with: .NET 4.0 • C# • yam
Recent Comments