How to Get File Extension in C#/CSharp

To get file extension in C#, we make use of GetExtension() static method of Path 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) { string file = @"C:\Users\ADMIN\Desktop\delete.txt"; string extension = Path.GetExtension(file); Console.WriteLine(extension); } } }

How to Get Application Path in C#/CSharp

To get application path in C#/CSharp, we make use of GetExecutingAssembly() static method of Assembly class, which resides in System.Reflection namespace.  Example is given below. using System; using System.Reflection; namespace Hello_World { class Program { static void Main(string args) { string path = Assembly.GetExecutingAssembly().Location; Console.WriteLine(path); } } }

Math Functions in PHP

Apart from arithmetic operators, we also have Math functions in PHP.  Click Here for list of Math functions in PHP.  There are few commonly used Math functions given below. Is_int:  This function will check if the passed value is integer or not and return true or false. Is_float:  This function will check if the passed

Arithmetic Operators in PHP

Like any other programming language, we do have integer and float data types in PHP.  Integers are whole numbers, can have both positive and negative values like -1, -2, 1, 3 etc.  Floats are known as decimal numbers like 1.25, 3.2 etc.  Using integers and floats, we can perform numerical calculations like addition, subtraction, division

Odd & Even Selectors in jQuery

Whenever you select an element by Tag Name, it will return collection of elements which have the same Tag Name.  That collection always starts from 0.  We can manipulate those elements by their odd and even position in collection using Odd and Even selectors in jQuery.  We are going to use Tag Name and ID