C# constants π

Поделиться
HTML-код
  • Опубликовано: 15 ноя 2024

Комментарии • 18

  • @BroCodez
    @BroCodez  3 года назад +9

    using System;
    namespace MyFirstProgram
    {
    class Program
    {
    static void Main(string[] args)
    {
    // constants = immutable values which are known at compile time
    // and do not change for the life of the program
    const double pi = 3.14;
    //pi = 420; //can't change this constant
    Console.WriteLine(pi);
    Console.ReadKey();
    }
    }
    }

  • @merdacast908
    @merdacast908 Год назад +3

    Nice, lets continue watching the course - really good

  • @ibrahemali7373
    @ibrahemali7373 2 года назад

    the best lesson number 4
    and the fastest

  • @v4t0z
    @v4t0z 3 года назад +1

    Nice work

  • @namchannhan9880
    @namchannhan9880 Год назад +5

    bro has to used 420

  • @spartanranger
    @spartanranger 3 года назад +1

    Thanks for the video Bro

  • @ramsay9912
    @ramsay9912 2 года назад

    so i wanna use localDB and i have to use a String thats const in my DataBaseHelper,
    for some reason it doesnt let me set the
    const bd_Path = Directory. GetCurrentDirectory(). Substring (0, Directory. GetCurrentDirectory(). Length-24) + @"Database\Database.mdf;
    it seems that it doesnt allow me to define an const with an function :/
    is there any way i can bypass that?
    i thought about using a global variable and then create that const using the global/public varibale, what do you think?
    & thx for the video

  • @definitelynotchris4776
    @definitelynotchris4776 Месяц назад

    thank you

  •  3 года назад +1

    Thanks!

  • @sandarubandara4437
    @sandarubandara4437 10 месяцев назад

    Thanks

  • @K4vin60
    @K4vin60 9 месяцев назад

    thanks bro

  • @WickedJackThe1
    @WickedJackThe1 Год назад

    You're the best!

  • @ZeeWolfed
    @ZeeWolfed 2 года назад

    thanks

  • @whitedinamo
    @whitedinamo 2 года назад

    lesson check😇

  • @simik4830
    @simik4830 Месяц назад

    comment for algorithm!

  • @budderrar5751
    @budderrar5751 Год назад

    noice