Showing posts with label VB. Show all posts
Showing posts with label VB. Show all posts
Sunday, January 19, 2014
Favor composition over inheritance
I guess VB6's class model wasn't so bad after all.
Friday, January 17, 2014
Extension to mimic the old VB string function
public
static class BlahExtension
{
public
static char[] Space(this int cnt, char c = ' ' )
{
return
Enumerable.Repeat(c,cnt).ToArray();
}
}
public static string Space(this int cnt, char c = ' ')
{
return new string(Enumerable.Repeat('f', 10).ToArray());
}
Subscribe to:
Comments (Atom)