Thursday, August 27, 2009

AnkhSVN with a blue plus sign in Visual Studio even when you are connected to SVN

Recently, I opened my Visual Studio project that had AnkhSVN and all the files had a blue plus sign next to it.  I went to the Options menu and made sure that I had AnkhSVN as my Source Control Provider but for some reason it thought everything was new files.
The problem appears to be that I upgraded my TurtoiseSVN and didn't also upgrade my AnkhSVN. When I upgraded AnkhSVN, everything seemed to be fixed.
- Ted

Monday, August 10, 2009

Check if a String is a number

You could try:

bool isNum = double.TryParse(Str, out Num);
if (isNum) Then

Or you could try the IsNumeric function from Microsoft.VisualBasic.FileIO

Monday, August 3, 2009

Start Windows Explorer on a specific directory in VB.NET

System.Diagnostics.Process.Start("Explorer.exe", "c:\dev\")

Default Values to Properties

Got this from:

The DefaultValue attribute gives a property's default value. If you right-click on the property in the Properties window and select Reset, the property is reset to this value.

Usually the DefaultValue is the same as the property's initial value. This example uses the same constant for the FirstName property's initial and default values.

Private Const m_DefaultFirstName As String = "<unknown " & _
"first name>"
Private m_FirstName As String = m_DefaultFirstName

<DefaultValue(m_DefaultFirstName)> _
Public Property FirstName() As String
Return m_FirstName
End Get
Set(ByVal Value As String)
m_FirstName = Value
End Set
End Property