A must have reference for daily stand up meetings by SSW.
Check it out here
A must have reference for daily stand up meetings by SSW.
Check it out here
After playing for a few weeks testing Windows Form applications, I would like to give you some tips and tricks:
Enjoy!
If you have an Android device and want to have great time with your toddler, I strongly recommend the Learning Flag application. It is ready in the Android Market at this link
Feel free to send suggestions, comments and errors!
More features and applications soon!
Enjoy it with your kid.
Thanks.
Type ? and hit your TAB key and you will get them.
If you know the first letters of your snippet, like for example “property”, type “prop?” and then hit the TAB key. The snippet that creates a property in a class will be launched.
Here are the most used snippets:
Application – Compiling, Resources and Settings -> Load an Assembly at Run Time; appLoad
Application – Compiling, Resources and Settings -> Write to a Text File; appLog
Collections and Arrays -> Iterate through a collection; colIter
Collections and Arrays -> Locate an Element in an Array; arrLoc
Connectivity and Networking -> Create an E-Mail Message; conEmail
Data – Designer features and ADO.NET -> Create a Server based SQLConnection to SQL Server; adoCreateSqlConn
Data – Designer features and ADO.NET -> Create a Parameterized SELECT Command; adoSelectwParams
Data Types – defined by Visual Basic -> Convert an Array of Bytes into a String; typeByteStr
Data Types – defined by Visual Basic -> Parse an E-Mail Address; typeParseEmail
File System – Processing Drives, Folders and Files -> Copy a File; filCopyFile
File System – Processing Drives, Folders and Files -> Create a File; filCreateFile
File System – Processing Drives, Folders and Files -> Read Text from a File; filReadText
File System – Processing Drives, Folders and Files -> Write Text to a File; filWriteText
Math -> Get a Random Number using the Random Class; mathRand
Security -> Encrypt a String; secEncrypt
Security -> Find the Current User’s Name; secUser
Windows Forms Applications -> Forms -> Determine which Control on a Windows Form is selected; formSelect
Windows Forms Applications -> Forms -> Display a Windows Form; formNew
Windows Forms Applications -> Controls and Components -> Add Menu Items to Windows Forms; menuAddItems
Windows Forms Applications -> Sound -> Play a Sound; sndPlay
Windows Operation System -> System Information -> Determine Desktop Display Resolution; sysRes
Windows Operation System -> System Information -> Determine the Windows System Directory; sysDir
XML -> Iterate named nodes in XML Document; xmlIter
XML -> Read XML from a File Using XmlTextReader; xmlReadTxt
To use NDoc v. 1.3 with .NET Framework 2.0 do the following:
<configuration>
<startup>
<supportedRuntime version=”v2.0.50727″ />
</startup>
</configuration>
That’s all!. If you want to run the NDocConsole.exe just create another NDocConsole.exe.config with the same txt and you are done.
If you want to use the full power of XML Comments in VB, check Recommended XML Tags for Documentation Comments
Public Shared Operator + (objA as myClass, objB as myClass ) as MyClass 'code End Operator
ObjC = ObjA + ObjB
dim i as Nullable(Of Integer) If not i.HasValue then Console.WriteLine("i is a null value") End If i=100 If i.HasValue then Console.WriteLine("Nullable integer i = " & i.Value) End If
Example 1
Public Class GenericList(Of ItemType) 'Some Code End Class Example 2
Public Class GenericList(Of Item Type) Inherits CollectionBase Public Function Add(ByVal value as ItemType) as Integer Return List.Add(value) End Function Public Sub Remove(ByVal value as ItemValue) List.Remove(value) End Sub Public ReadOnly Property Item(ByVal index as Integer) as ItemType Get Return CType(List.Item(index),ItemType) End Get End Property End Class
Program Code
Dim List as New GenericList(Of String) List.Add("blue") List.Add("red") List.Add(Guid.NewGuid()) ' Will be detected by the compiler
Example 3 - More than one type parameter in the class
Public Class GenerichashTable(Of ItemType, KeyType) Inherits DictionaryBase 'Code End Class
Example 4 - Define Constraints to Parameters
Public Class SerializableList(Of ItemType as ISerializable) Inherits CollectionBase 'Code End Class Public Class ControlCollection(Of ItemType as Control) Inherits CollectionBase 'Code End Class If you want your class to create an instance of the Item
Public Class GenericList(Of ItemType as New) Inherits CollectionBase 'Code End Class Example 5 - Define more than one constraint
Public Class GenericList(Of ItemType as {ISerializable, New}) Inherits CollectionBase 'Code End Class Generics also works with structures, interfaces, deletates and methods.
Double Click the My Project node in the Solution Explorer and select the Settings tab. Add the Name, Type, Scope and Value of your setting.
From your code, type:
dim aSetting as string
aSetting=My.Settings.YourSettingName
If you select User from the Scope drop-down list, you can modify that setting in runtime. The modify your setting and save it like this:
MySettings.YourSettingName = “NewValue”
MySettings.Save()
This will create a file under Documents and Settings\[UserName]\Local Settings\Application Data\[Application Name]\[Unique Directory] for the current user only with the selected value.
This will embed the image in your assembly. If you want to modify the image, replace the image inside the Resource Directory and recompile. There is no need to modify the code.
This approach is better than the ImageList because ImageList does not support typed resources. However, there are controls that do no support it and you have to fill the imagelist with the resource images in your code if you want to use it in this way.