Applying multiple namespaces to a class
Something that I’ve seen a few people do when they want to create a library that has namespace’s is to actually nest the namespace’s in their code.
Namespace System
Namespace security
Namespace Cryptography
Public Class MyNewClass
End Class
End Namespace
End Namespace
End Namespace
IMHO this loo...
Get a value back from a dialog form
One thing that commonly comes up on forums, is people asking how they can get information back from a modal form.
What a lot of people seem to forget is that a form is just another object, the same rules apply to it as any other object that you create in .Net. The most commonly used method for getting some information about the state of an obje...
Get the ID for the last inserted record
When you’re dealing with SQL Server doing inserts, you commonly want the identity to be a number which increments from 1. But one of the problems with this being automatically incremented is that you don’t immediately know what the ID for the last item you added is.
SQL Server provides the capability for you to get this information by using the...
Sending an email from a .Net application
This is something that I found myself doing over and over again so I decided to create a class that simplified the process of sending an email from a .Net application.
As mentioned in the comment, feel free to use this code within your applications, the only requirement is that you leave the comment in place. I also wouldn’t say no to getting a...
Get the mid point between two date times
I have been asked how to do this a couple times now, so I thought I would post a function that deals with getting the mid point between two date times.
Public Function getMidDateTime(ByVal dt1 As DateTime, ByVal dt2 As DateTime) As DateTime
Dim rtn As DateTime
Dim diff As Integer
diff = DateDiff(DateInterval.Second, dt1, dt2)
rt...
SQL Server list columns in table
This is one method of getting a list of all the columns in a table on SQL Server
SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME=@TABLE_NAME
Reserved words in VB.Net
The following is a list of words that should not be used in VB.Net for variable names as they are already used as part of the VB.Net language.
AddHandler
AddressOf
Alias
And
AndAlso
Ansi
Append
As
Assembly
Auto
Binary
Boolean
ByRef
Byte
ByVal
Call
Case
Catch
CBool
CByte
CChar
CDate
CDec
CDbl
Char
CInt
Class
CLng
CObj
Compare
CShort
CSng
CStr
CT...
How to zero the free space on your hard drive on Linux
The reason you’re reading this tutorial is probably because you have read about how when you delete a file it isn’t actually deleted only the pointer which tells the OS where to find the file is deleted and you want to reduce the chance of someone being able to recover files that you have deleted from your computer (please bare in mind that the ...
97 post articles, 13 pages.