ShowUsYour<Blog>
Irregular expressions regularly
-
SizeOf
using System;
using System.Reflection ;
using System.Runtime ;
namespace ConsoleTests
{
/// <summary>
/// Summary description for TestSizeOf.
/// </summary>
public class TestSizeOf
{
static void Main(string[] args)
{
Student[] students = new Student[3] ;
string[] names = new string[] {"darren", "paul", "harry"} ;
int[] ages = new int[] {18,21,32} ;
string[] descriptions = new string[] {
"A",
"This is a medium description",
"This is a slightly longer description"
} ;
for(int i = 0; i <= names.GetUpperBound(0); i++)
{
students[i] = new Student(names[i],ages[i],descriptions[i]) ;
int studentSize = students[i].GetSize() ;
Console.WriteLine("The size of {0} is {1}{2}", names[i], studentSize, Environment.NewLine ) ;
}
Console.Read() ;
}
}
public class Student
{
string name ;
int age ;
string description ;
public Student(string name, int age, string description)
{
this.name = name ;
this.age = age ;
this.description = description ;
}
public int GetSize()
{
return 24 + (4 + (name.Length * 8) + (description.Length * 8)) ;
}
}
} -
Week in review
Here's some of the really cool things that I've seen this week...
-
New look for MSDN
-
More IDE tips that you can poke a macro at...
While showing-off the previous tip to a mate I was eagerly pointed in the direction of this link:
-
VS.NET & Source Safe tip
<Tip TipAuthor="J. Ambrose Little" TipAuthorUrl="http://www.aspalliance.com/Ambrose/">
<Question>
If a file is checked out in VSS, I would like to see who has the file
checked out through Visual Studio.Net. That would save a trip back to
the VSS client to try to track the person down.
</Question>
<Answer>
There are two ways (that I know of). One is to add the source control
toolbar to your toolbars and choose the properties button, which has a
status tab, IIRC. The other is to select the file and go to
File -> Source Control -> Properties.
</Answer>
</Tip> -
70-310/70-320 Certification resources
Useful study resources for the 70-310/70-320 exam...
-
The magician's nephew
The Narnia series of books is my favourite series, and Digory Kirke is my favourite character in the series. I can relate to his character in many ways; he lives in two worlds, he constantly being tempted to do the wrong thing :-) and in the end things seem to work out well for him. Narnia is a simple story told simply and elegantly, the depth of the characters is simply amazing.
-
It's a .... VB Programmer!!!
2 newsworthy items tonight:
-
Kickstarter.net
Recently I've been trialling a product called Kickstarter [ Kickstarter website ] with a view to using it for:
- Stored Procudure generation
- Data Access Layer code generation
- Business Objects code generation
- Web Forms Creation
-
The great Right to Left assignment debate :-)
There's a conversation occuring on serveral other blogs about the validity of statements that assign to multiple variables in a right to left manner. Methinks that a few people are confusing C# with VB :-) - oh well, at least I get to show off the amazing powers of the MarkItUp component again ;) - http://www.markitup.com/Client/MarkItUpNew.asp