Saturday, 25 February 2017

Creating Pyramid in C#

Creating Pyramid in C#


To using Console Application......




class :-- application.cs

------------------------------------------------

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplicationfirst
{
    class Program
    {
        static void Main(string[] args)
        {
            fnpyramid obj = new fnpyramid();
            obj.createPyramid();

            Console.WriteLine("\n");

            obj.createPyramidNumber();

            Console.WriteLine("\n");
            Console.WriteLine("Example made by DOTNET BY VICKYPEDIA");
            
            Console.Read();
        }
    }
}




class :-- fnPyramid.cs

------------------------------------------------

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplicationfirst
{
    class fnpyramid
    {
        /// <summary>
        /// Create function for print pyramid like....
        ///     1
        ///    121
        ///   12321
        ///  1234321
        /// 123454321
        /// </summary>
        public void createPyramid()
        {
            int numberoflayer = 6, Space, Number;
            Console.WriteLine("Print paramid as Number");
            for (int i = 1; i <= numberoflayer; i++)
            {
                for (Space = 1; Space <= (numberoflayer - i); Space++)
                    Console.Write(" ");
                for (Number = 1; Number <= i; Number++)
                    Console.Write('*');
                for (Number = (i - 1); Number >= 1; Number--)
                    Console.Write('*');
                Console.WriteLine();
            }
        }


        /// <summary>
        ///  Create function for print pyramid like....
        ///          *
        ///         ***
        ///        *****
        ///       *******
        ///      *********
        /// </summary>
        public void createPyramidNumber()
        {
            int numberoflayer = 6, Space, Number;
            Console.WriteLine("Print paramid as Star");
            // Total number of layer for pramid
            for (int i = 1; i <= numberoflayer; i++) 
            {
                // Loop For Space
                for (Space = 1; Space <= (numberoflayer - i); Space++)  
                    Console.Write(" ");
                //increase the value
                for (Number = 1; Number <= i; Number++)
                    Console.Write(Number);
                //decrease the value
                for (Number = (i - 1); Number >= 1; Number--) 
                    Console.Write(Number);
                Console.WriteLine();
            }
        }

    }
}





OUTPUT
--------------------------------


Wednesday, 1 February 2017

Hello World Program with MVC

Hello World Program with MVC


Step :-1 --- Select Web Project - ASP MVC Application
----------------------------------------------------------------------------------


















Step:-2 -- Select Project Template and View Engine ( ASPX)
--------------------------------------------------------------------------------

















Step :3 -- Add Controller & Rename Controller
----------------------------------------------------------------

















Step :4-- Add View and Unchecked the master layout
------------------------------------------------------------------------------

















Step:5--- Add Content As per requirement / Design into view page
-------------------------------------------------------------------------------------

















Step:6 -- Add Route action name as "....." View Page name
-------------------------------------------------------------------------------
















Step:7 -- Change Controller function same name as view name
---------------------------------------------------------------------------------

















Step:8 -- Run the Application & Enjoy MVC Application
------------------------------------------------------------------------------















Enjoy With Example.... Show the Images Step By Step.......

Factorial of a Number

Recently Viewed