Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

JEEVITHAPROJ

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

namespace JEEVITHAPROJ
{
    class Program
    {
        static void Main(string[] args)
        {
            Class2 c = new Class2();
            
                       
            //TATAMotors objt = new TATAMotors();

            Vendor1 v = new Vendor1();
            v.Billing();

            /*
            Tax obj = new Tax();
            decimal t=obj.CalTax(5000);

            obj.Discount(t);


            /*
            HiTechBranch h = new HiTechBranch();
            h.Discount(5000);

            KukatpallyBranch objk = new KukatpallyBranch();
            decimal disc=objk.Discount(5000);

            decimal finalbill = 5000 - disc;

            /*

            C obj = new C();

            obj.M1();
            obj.M2();
            obj.M3();

            /*
            Operations ops = new Operations();
            ops.Add(45, 7, 3);

            /*
            Restuarant res = new Restuarant();

            string[] orders = {"Biryani","Coke","Vanilla icecream" };

            string orderready= res.PlaceOrder(orders);

            Console.WriteLine(orderready);

            /*
            Operations ops = new Operations();
            int total=ops.Add(90, 453);

            Console.WriteLine(total);

            /*
            //Operations ops = new Operations(35, 90);

            //create an object for class zoo
            //new operator is used to create memory for our class
            //witout new operator, we can not instantiate class
            Zoo z = new Zoo();

            z.Animals();
            int a=z.Curator();

            Console.WriteLine(a);

            /*
            Dictionary<string, List<string>> dictDColleges = new Dictionary<string, List<string>>();

            #region ADD VALUES INTO A LIST
            List<string> lstColleges = new List<string>();

            lstColleges.Add("COLLEGE1");
            lstColleges.Add("COLLEGE2");
            lstColleges.Add("COLLEGE3");
            #endregion

            dictDColleges.Add("RANGAREDDY", lstColleges);

            //RE-INITIALIZE
            lstColleges = new List<string>();
            lstColleges.Add("COLLEGE2");
            lstColleges.Add("COLLEGE3");
            lstColleges.Add("COLLEGE5");

            dictDColleges.Add("SANGAREDDY", lstColleges);


            /*
            //DECLARING A DICTIONARY
            Dictionary<string, string> dictNames = new Dictionary<string, string>();

            //STORING VALUES INTO A DICTIONARY
            dictNames.Add("HT001", "JACK");
            dictNames.Add("HT002", "HEMANTH");
            dictNames.Add("HT003", "JOHN");
            dictNames.Add("HT004", "MIKE");
            dictNames.Add("HT005", "REDDY");

            //PRINTING
            foreach(KeyValuePair<string,string> d in dictNames)
            {
                Console.WriteLine("KEY:{0}, VALUE:{1}", d.Key, d.Value);
            }

            /*
            List<string> lstNames = new List<string>();

            lstNames.Add("JOHN");
            lstNames.Add("MIKE");
            lstNames.Add("JACK");
            lstNames.Add("KARIM");
            lstNames.Add("JEEVITHA");

            foreach(string n in lstNames)
            {
                Console.WriteLine(n);
            }

            Console.WriteLine("--------------------");

            Console.WriteLine("Enter name that you want to search...");
            string srchName = Console.ReadLine();

            //? : ARE ITENARY OPERATORS
            string message = lstNames.Contains(srchName) ? string.Format("{0} exists in the list",srchName) : string.Format("{0} does not exists in the list",srchName);
            Console.WriteLine(message);

            /*
            bool isFound = false;

            foreach (string n in lstNames)
            {
                if (srchName.Equals(n))
                {
                    isFound = true;
                    break;
                }
            }

            if (isFound)
            {
                Console.WriteLine("{0} EXISTS in the list!",srchName);
            }
            else
            {
                Console.WriteLine("{0} does not exists!",srchName);
            }
            */

            Console.ReadKey();

            /*
            //declaring an array
            int[] numbers = new int[5];

            //storing
            numbers[0] = 10;
            numbers[1] = 50;
            numbers[2] = 40;
            numbers[3] = 30;
            numbers[4] = 20;

            int[] numbers2 = new int[2];
            numbers2[0] = 900;
            numbers2[1] = 4500;

            int[] mergearrays = numbers.Concat(numbers2).ToArray();
            int[] sortarray=  mergearrays.OrderBy(x => x).ToArray();

            //find the min and max values from an array
            
            Console.WriteLine("Sum:{0}",numbers.Sum());
            Console.WriteLine("Average:{0}", numbers.Average());

            //int result = 0;

            ////printing array
            //foreach(int n in numbers)
            //{
            //    result = result + n; 
            //}



            Console.ReadKey();
            /*
            int number = 500;
            number = 90; //hover mouse

            string name = "Async cloud solutions pvt ltd";

            //#1. FIND SMALLEST AND BIG VALUES FROM 3 NUMBERS
            
            Console.WriteLine("Enter any value for A");
            int a = Convert.ToInt32(Console.ReadLine());

            Console.WriteLine("Enter any value for B");
            int b = Convert.ToInt32(Console.ReadLine());
          
            //1.if and else
            if (a>b)
            {
                Console.WriteLine("{0} IS BIG",a);
            }
            else
            {
                Console.WriteLine("{0} IS BIG",b);
            }
            
            //Console.WriteLine(name);
            Console.ReadKey();
            */
        }
    }    
}

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.