If you are in a company in which the Fiscal Year does not start January 1st, it might become necessary in your code, to figure out what the actual Fiscal Year is at any point during the year. The following is a method (in C#) which returns a string based on the fact that the […]
Let’s say you’re adding some newer CSS changes to your site and for some reason, they work fine in Chrome or Firefox, but not showing up like they should in IE10.
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 […]
Recently I’ve been working on several stored procedures for DotNet applications and, though they were created successfully, when creating and editing them in the SQL Server Management Studio window, some, but not all of the column names in the list to be selected/inserted/updated would have the well-known red squiggly lines beneath them, and the tooltip […]
Can’t remember where the Framework folder is located? That’s easy: %WinDir%\Microsoft.NET\Framework That will get you to the place where you can navigate between the folders for the different versions of .Net which have been installed.
In the old days, when a new version of Visual Studio was released, many times, when opening an older project, it was converted to the new version and, from there, there was no going back. If you chose to make a backup during this process, you were ok.
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 […]
Knowing the environment variables in your program can sometimes be a very important aspect of your application. It’s very easy to get a list of and to use any one of the environment variables however you need it.
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.
All Things DotNet Discussed – Winforms/ASP.Net/SharePoint/WPF