First, let’s start off by explaining what an automatic or auto-implemented property is. Earlier in VB.Net, to create a property, you would need a structure like this: Private _Name As String = “” Public Property Name As String Get return _Name End Get Set(value As String) _Name = value End Set End Property
Let’s say you have a generic list: (VB.Net) Dim ProdList As New List(Of String) With ProdList .Add(“Alice Mutton”) .Add(“Chai”) .Add(“Chang”) .Add(“Gravad lax”) End With (C#) List ProdList = new List(Of, String); ProdList.Add(“Alice Mutton”); ProdList.Add(“Chai”); ProdList.Add(“Chang”); ProdList.Add(“Gravad lax”); Then, let’s say you want to loop through those items, one at a time and manipulate each one […]
Here’s the WinForms scenario: You have a listbox which has a context menu. If you try to right-click and item AND choose from the context menu, normal functionality will not choose the item you are actually selecting with your mouse. Normally, you would need to select the item with the left button and then use […]
Sometimes it becomes necessary to create a solution and either you don’t have a solution file for your project, or your solutiion file has been renamed or has become corrupted. At that point, it’s not as straight forward as one would like in order to get it done. However, it’s not a laborious task at […]
Have you ever wanted a combo box in your WinForms application that listed all the available fonts on the computer where it was running? Below, you’ll find a simple script to do do just that.
Most people know that, with a string in ASP.net or WinForms development, you can use the replace function to replace certain characters within a string with others. And, you probably know that you can even remove characters alltogether, using the replace function.
When ADO.Net was being built, they built it with XML in mind. It’s very easy to extract XML data from a DataSet in ADO.Net.
Since you don’t do it that often, sometimes it’s hard to remember how you can add and use your Help file (.chm) in your WinForms project, using Visual Studio. You can use the HelpProvider control and control everything you need through it, or you can do things the simplest way possible.
There are quite a few posts on the internet, I found, that have to do with the cause and the fix for an error sending email in DotNet: An invalid character was found in the mail header: ‘;’ The problem for those was due to problems with an attachment. I got this error, and I […]
Every time I build a setup project in Visual Studio.Net, I find it very easy to use the wizard and setup the program menu, etc, but for some reason, I can never remember where to change the Manufacturer and Product Name, so that when it’s installed, it will go to specific folders.
All Things DotNet Discussed – Winforms/ASP.Net/SharePoint/WPF