How to change the time in a DateTime in c# or VB.NET
To change the time in a DateTime you can either use Timespan or the add methods of the DateTime class. I will show you both ways and give you also…
All the Code Snippets and Samples you need
To change the time in a DateTime you can either use Timespan or the add methods of the DateTime class. I will show you both ways and give you also…
There is more than one way to get the current username using C# or VB.NET i will show you one using Environment Variable and one using the WindowsIdentity. If you are in a Network…
To rename a file in c# or vb.net you need to Move it, there is no inbuild function that would just rename a file without moving. The Move function can…
To replace multiple spaces with a single space in c# or vb.net you can use a Regular Expression Sample c# Sample VB.NET there are more ways to do that, but…
How can a class marked as Deprecated/Obsolete in c# or vb.NET? You can mark a class, method or property by adding the Obsolete Attribute above the declaration. Sample C#…
How to convert int to hex and hex to int in C# or VB.NET? Example C# Example VB.NET see also Standard Numeric Format Strings in the MSDN.
How to populate a XDocument from a String? Example C# Example VB.NET see the msdn for more informations XDocument.Parse Method
Replacing a line break is a simple challenge. In .NET there are plenty of ways to do that. You can for example use String.Replace or Regex.Replace. My prefered method is…
If you need to force a .NET Application to run with Administrative Privileges, you simply need to modify the Application Manifest File of your Project. If you need Help Adding…
This code snippet can help you to calculate a Person’s age using C# and VB.NET. C# Snippet #region using System; #endregion namespace de.Fesslersoft.CalculateAge { internal class Program { public static…