Creating Table & Columns in SQL

In a database, the data is stored in the form of tables.  In a table, there are couple of columns to store the data in an organized manner.  One of the column in table is marked as Primary Key.  Primary key is basically used to uniquely identify each record in a table. There are various

How to Copy File in C#/CSharp

To copy a file in C#/CSharp, we make use of File class and its method Copy.  This class resides in System.IO namespace.  Example is given below. using System; using System.IO; namespace Hello_World { class Program { static void Main(string args) { //Source of file string source = @"C:\Users\ADMIN\Desktop\folder1\file.txt"; //Destination Folder string destination = @"C:\Users\ADMIN\Desktop\folder2\"; //Destination

Enums in C# with Example

Enums stands for enumerations.  It is basically a set of integral numbers.  Enums are value types.  Enums make your program more readable as well as more maintainable. I know since you are new to C#, the above lines do not make sense to you at all.  Lets understand enums with a very basic example.  Whenever

How to Delete a File in C#/CSharp

To delete a file in C#/CSharp, we make use of File class and its static method called Delete.  It will take path of the file as parameter.  Example is given below. using System; using System.IO; namespace Hello_World { class Program { static void Main(string args) { string path = @"C:\Users\ADMIN\Desktop\delete.txt"; File.Delete(path); Console.WriteLine("File Deleted!"); } }

How to Get File Size in C#/CSharp

To get file size in C#/CSharp, we make use FileInfo class which resides in System.IO namespace.  Example is given below: using System; using System.IO; namespace Hello_World { class Program { static void Main(string args) { long filesize = new FileInfo("filname.txt").Length; Console.WriteLine(filesize); } } }