Bobby Bob
Entity Framework SQL Error 19 - Foreign Key Constraint Failed
I've described the problem in significant detail here: https://stackoverflow.com/questions/74162855/entity-framework-sql-error-19-foreign-key-constraint-failed
Not sure why I am getting the error I am getting. If you guys want to replicate the error, you should change the connection string
Data Source =
to your respective path of where the database CoffeeShop.db
is in3 replies
(Concept Question) Delegates and Lambda Expressions [Answered]
I'm so confused about the concept of Delegates and Lambda Expression
Specifically this code
(movie) => new string('*', (int)movie.Rating)
Is this suppose to create a new method in place of (movie)? I looked through the lowered C# code on sharplab but it's even more confusing o-0122 replies
Static vs Non-Static classes [Answered]
Please see here for the detailed question and all of the relevant code: https://gist.github.com/blueboy90780/f67813131e7a568d7998fcfea1166bd3
53 replies
What is the difference between a dictionary and enum in C-Sharp? [Answered]
So I have the following enum
But I'm not sure if an enum is an appropriate type for this because I want to use a switch case statement with the enum based on the string input the program receives from console
17 replies
Access Modifiers in C-Sharp [Answered]
Which access modifier take precedence during runtime? The access modifier at the class level, the method level or the field level? Do the access modifier at the class level override all the access modifier for it's members? Is there a precedence being taken place? etc... etc....
57 replies
Difference between String and string keyword [Answered]
There's 2 string types that exists in C#. One with a capital letter and one without a capital letter. I've been taught, when I was learning Java, that by convention every primitive type is lowecase and every reference type is PascalCase.
This convention seems to extend to C# as well. Every reference type in C# is CamelCase (+ properties, no idea if that's reference type or not). Everything adheres to this convention except for one which is the String keyword, I've no idea what the hell this is, why it exists and if it was even intended to be there in the language?
38 replies