Categories
C# / .NET Program

C# SubString Function program (with example)

Substring: It is an method provided by String class. It accepts 2 arguments. (String start value, Length of string) Argument should be integer value. Syntax Substring(int StartIndex,int Length)  Example If we use Substring(3,5) , the output will be as below. “HOWAR”   Program for Substring using System; namespace StringFunctions { class Program { static void […]

Categories
Program Tutorial

Understanding GridView Code Behind in ASP .NET (with example)

Before going through to GridView Code Behind file, you must know to use GridView control from drag and drop in Design view of ASP .NET. Read this “How to use GridView Control..” article to understand the GridView in simple drag and drop. Sample Code: <asp:GridView ID=”GridView1″ runat=”server” AutoGenerateColumns=”FALSE” DataSourceID=”SqlDataSource1″> <Columns> <asp:BoundField DataField=”fname” HeaderText=”fname” SortExpression=”fname” /> […]

Categories
C# / .NET Program

Finding Factorial Number using C# Program (for beginners)

using System; namespace FactorialNumber { class Program { static void Main(string[] args) { int num, fact = 1, i; Console.WriteLine(” Enter number of values to perform factorial : “); num = Convert.ToInt32(Console.ReadLine()); for (i = 1; i <= num; i++) { fact = fact * i; } Console.WriteLine(” Factorial Value is {0}”,fact); Console.ReadKey(); } } […]

Categories
C# / .NET Program

Finding greatest of 3 number program using C# (for beginners)

Its an simple program for finding greatest of 3 number. using System; namespace FindingGreastestNumber { class Program { public void GreatestNumber(int x, int y, int z) { // Checking for same number if((x==y)&&(y==z)) { Console.WriteLine(” Given values are same… Please provide different values. “); Console.ReadKey(); } else if((x==y)&&(y>z)) { Console.WriteLine(“a and b values are same.. […]

Categories
C# / .NET Program

Fibonacci Series program using C# for beginners with Explanation

Fibonacci Series Program  is an very basic program for every language, even you will get this kind of questions in freshers interview, because I too faced this question in my fresher .NET interview. Even-though its very simple to calculate sometimes beginners face some difficulties in performing Fibonacci series in C#. Here is an example of […]

Categories
Program

What is difference between PHP and ASP?

Before knowing difference between PHP and ASP, we must know the expansion of PHP and ASP, PHP – Hypertext Pre Processor ASP – Active Server Page   PHP [dropcap background=”yes” color=”#333333″] I[/dropcap]ts is an web development language, it is a popular general-purpose scripting language that is especially suited to web development. Fast, flexible and pragmatic, PHP […]