Skip to main content

Posts

Fibonacci Series

Print Fibonacci Series:     Console.WriteLine("Print Fibonacci series");      int a = 0, b = 1, sum = 0, n = 10;             for (int i = 1; i <= n; i++)             {                 sum = a + b;                 a = b;                 b = sum;                 Console.WriteLine(a.ToString());             } Output:

Print ASCII Character

                 Console.WriteLine("ASCII Character");                     for (int c = 1; c <= 256; c++)             {                 Console.WriteLine(c + ": " + Convert.ToChar(c) + "\n");                 Console.ReadLine();             } Output:

Joining in SQL

This article explains how to join tables in SQL Server. Joining in SQL There are various type of SQL joinning. A few of them that are commonly used are described below. 1: Inner join 2: Right Outer Join 3: Left Outer join First Step First create a SQL table named bio. The following is the second table named fee.   Now  insert  values into the bio table. Now  insert  values into the fee table.   Second Step   using  System; using  System.Collections.Generic; using  System.Linq; using  System.Web; using  System.Web.UI; using  System.Web.UI.WebControls; using  System.Data.SqlClient; using  System.Data; public   partial   class   SQLJoins  : System.Web.UI. Page {      protected   void  Page_Load( object  sender,  EventArgs  e)     {     }      Sql...

Check String is Palindrom

Definition    A   palindrome   is a word or sentence that reads the same forward as it does backward.   Source Code:     string str, rever = "";     int length;     Console.WriteLine("Enter String to check for Palindrom: ");     str = Console.ReadLine();     for (length = str.Length - 1; length >= 0; length--)     {         rever = rever + str[length];     }     Console.WriteLine(rever.ToString());     Console.ReadLine();     if (rever.ToString() == str.ToString())     {         Console.WriteLine("String is a Palindrom");         Console.ReadLine();     }     else     {         Console.WriteLine("String is not a Palindrom");         Console.ReadLine();     } Output:

Abstract Class

An Abstract class is a class that provides a common definition to the subclasses and this is the type of class whose object is not created. key points of Abstract classes are: Abstract classes are declared using the abstract keyword. We cannot create an object of an abstract class. If you want to use it then it must be inherited in a subclass. An Abstract class contains both abstract and non-abstract methods. The methods inside the abstract class can either have an implementation or no implementation. We can inherit two abstract classes; in this case the base class method implementation is optional.  An Abstract class has only one subclass. Methods inside the abstract class cannot be private. Abstract classes are useful when you need a class for the purpose of inheritance and polymorphism. The purpose of an abstract class is to provide default functionality to its subclasses When a class cont...

LINQ

The three main data providers provided by Microsoft are: LINQ to objects for querying in-memory collections LINQ to SQL for querying relational databases LINQ to XML for querying XML data

What are the types of Authentication in ASP.NET?

 There are three types of authentication available in ASP.NET: Windows Authentication :  This authentication method uses built-in windows security features to authenticate user. Forms Authentication :  authenticate against a customized list of users or users in a database. Passport Authentication :  validates against Microsoft Passport service which is basically a centralized authentication service.