ASP.NET MVC, MVC, C#, PYTHON, JQUERY

Thursday, September 13, 2018

Half pyramid program for fibonacci series



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

namespace fibonaccipyramid
{
    class Program
    {
        static void Main(string[] args)
        {
            int i,a=0,b=1,n,c,j,k;
            Console.WriteLine("Enter the limit");
            n=Convert.ToInt32(Console.ReadLine());
            Console.WriteLine(a);
            Console.WriteLine(b);
            for (i = 1; i <= n; i++)
            {
         
                for (j = 1; j <= i; j++)
                {
               
                        c = a + b;
                        a = b;
                        b = c;

                        Console.Write(c);
                        Console.Write("\t");
               
            }
                Console.Write("\n");
            } Console.ReadLine();
        }
    }
}



Share:

Wednesday, September 12, 2018

Factorial program using recursion in c#




We have come across the situations where a function calls another function but there is one more possibility that a function calls itself.
When a function calls itself it is known as recursion. It is usually used where we have to repeat a process again and again.
The following program for finding factorial using recursion is an example of recursive function and its implementation.

  1. using System;    
  2.     
  3. namespace Recursion_Example   
  4. {    
  5.     class Program    
  6.     {    
  7.         static void Main(string[] args)    
  8.         {    
  9.            int n;
  10.             Console.WriteLine("Enter the Number");    
  11.     
  12.                
  13.              n =Convert.ToInt32(Console.ReadLine());     //read number from user
  14.     
  15.             double factorial = Factorial(n);    //invoke the static method    
  16.     
  17.             //print the factorial result    
  18.             Console.WriteLine("factorial of"+n+"="+factorial.ToString());    
  19.     
  20.         }    
  21.         public static double Factorial(int n)    
  22.         {    
  23.             if (n == 0)    
  24.                 return 1;    
  25.             return n * Factorial(n-1);//Recursive call    
  26.     
  27.         }    
  28.     }    
  29. }    
Share:

Friday, September 7, 2018

Main() Method In C#

Main() Method In C# 

Hello Friends In this article we will learn about What is Main() Method in C#.



  • Main() Method is an entry point of an application.
  • Main () Method means That execution of code start from Main() method.
  • When an application starts Execution C# compiler looks for in the source file is the Main() method.
  • You must include Main () method in a class make your program executable.


Example:-

public Class HelloCsharp
{
public static void Main(string[] args)  //Main () method 
System.Console.WriteLine("Hello Friends Welcome To Csharp4tech");
}
}
Share:

How to Find Factorial Using C#

            How to Find Factorial  Using C#

using System;
namespace FactorialDemo
{
    class Program
    {
        static void Main(string[] args)
        {
            int iCount, iUserNumber, iFact;
            Console.WriteLine("Please Enter A Number For Finding Factorial ");
            iUserNumber = Convert.ToInt32(Console.ReadLine());
            iFact = iUserNumber;
            for (iCount = iUserNumber  - 1; iCount &gt;= 1; iCount--)
            {
                iFact = iFact * iCount;
            }
            Console.WriteLine("Factorial of Entered Number {0}", iFact);
            Console.ReadLine();
        }
    }
}
Share:

C# Programming Structure

Classes in C#

C# classes are the primary building blocks of the language.C#  also provides some predefined set of classes and methods.These classes and Methods Provides various basis functionalities that you may want to implement in your Application.
Creating  First "Hello World" Program
Using System;
public class Hello
{
public static void Main(string []args)
{
         
Console.WriteLine("Hello,World!! \n");
            Console.ReadLine();
}
}


Let us look at the various parts of the given Program:
 The First Line of program using System; the using keyword is used to includes the System  namespace in the program.A program has multiple using statements.

 In the Code Class Declaration includes the method, Main() That Will display the message  ,"Hello,World !!" on your screen.

The next line defines the Main methods which is the entry point for all C# programs.The Main methods states what the class does when executed.

Some C# point -

  •    C# is case Sensitive 
  •  All statement and Expression must end with a semicolon(;).
  • The program start execution from " Main" Method.
Share:

Introduction to C#

C# is a Programming Language developed by Microsoft and approved by the European Computer Manufacturers Association (ECMA) and International Standards Organization (ISO). C# is modern general-purpose, Object-Oriented Programming Language. C# is developed by Anders Hejlsberg and his team during the development of.Net framework.
C# is designed for Common Language Infrastructure (CLI), Which consists of the executable code and runtime environment that allows the use of various high-level  Language on Different Computer platform and architectures

Integrated Development Environment (IDE) for C#
Microsoft provides Development tools for  C# Programming:

  • Visual Studio 2010 
  • Visual C# 2010 Express 
  • Visual Studio 2012
  • Visual Web Developer 
Share:

Exploring ASP.NET MVC

   Exploring ASP.NET MVC

MVC

The MVC Model is an alternate to the ASP.NET web forms Model For developing web application .It is a light weight model and Support Exiting ASP.NET Feature.It Separates the Following three main Components From application 

 Model - 

Refers to a set of classes that describe the data that the application work with .In addition these classes define the business  Logic that governs how to data can be manipulated.

View -

Refer to the components that defines an application user Interface.For Example ,Login that contains text boxes and buttons.
Share:

Creating a Dynamic Web Page in ASP.NET MVC.

Creating a Dynamic Web Page

To Create a dynamic and interactive web page.You need to Use Scripting 

-Clint-Side Scripting

-Sever-Side Scripting

                                                 Clint-Side Scripting

Clint Side Scripting enable to develop web pages that can dynamically respond to user input without having to interact with a web server.

                                                    Sever-Side Scripting

Server Side scripting provides user dynamic content that is based on information stored at a remote location, Such as a back -end Database .Server Side scripting include code Written in server -side Scripting Technologies,Such as Active Server Pages (ASP) And Java Server Pages (JSP) . 
Share:

Introduction To Web Application Development in ASP.NET MVC

 Introduction To Web Application Development

            Web Application is programs that are executed on the Web server from a web browser. 
These applications enable organizations to share information on the Internet and Corporate Intranets.
This information can be access from anywhere any time. The web application also supports commercial transactions. 

        The Three Layers of a Web Application   

Web application generally application broken into Three Layers. Each Layers has own Functionality. In Bellow Image, You Can see how three layers Contribute in Web Application






 Introduction to Web Pages

A Web application consists of many Web Pages. A Web page is Web document that Can be accessed through a Web Browser. Web pages are two Types:-

1:-Static Web Pages


  A Web page that contains only Static Contains and is delivered to the user as it is Stored is Called Static Web pages.

2:-Dynamic Web Pages

Web pages whose content  is generated dynamically by a Web Application or that response to user input and provides interactivity  is Call Dynamic Web Pages
Share:

Thursday, September 6, 2018

What is while loop in C# ?

Hello Friend in this article we will learn about while loop in C#.The while loop statement always checks the condition before executed the statement with in the loop.When the execution reaches the end of the statement in the while loop,the controls is passed back to the start of the loop.If the condition is true ,the while statement whith in the loop are executed again.


Syntax :

while(expression){
Statement
}
Share:

Tuesday, September 4, 2018

What is Action Method in ASP. NET MVC

Hello friends in this article we will learn about Action Methods in ASP.NET MVC. 

In a controller  class all public  methods are called Action Method.
Action Methods mainly have a one to one mapping with user interactions.

Share:

SOCIAL PROFILES

Search This Blog

Powered by Blogger.

Fixed Menu (yes/no)

yes

Contact Form

Name

Email *

Message *

Tags

Ads Section

Tags

ASP.NET MVC (7) C# (11) jQuery (1)