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(); } } }
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
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();
}
}
}
Nice, lets continue watching the course - really good
the best lesson number 4
and the fastest
Nice work
bro has to used 420
Thanks for the video Bro
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
thank you
Thanks!
Thanks
thanks bro
You're the best!
thanks
lesson check😇
comment for algorithm!
noice