Joschi
do defined route added to the the routes table when the app.Run() executed or before?
Thats not the actual Pipeline. Thats just the registering of the pipeline.
The pipeline runs, when a http request comes in. And the program only runs after app.Run is called.
5 replies
When should one use a custom delegate instead of Func/Action/Predicate?
Multicast delegates is how events are implement in C# as far as I know.
Delegates are not that often used, but they are valuable if you go deeper into the functional style of C#.
https://www.youtube.com/watch?v=2TXvwUgaMHs&t=1s
122 replies
Manipulating Strings
The idea would be, that you have a full script, 300+ pages long.
Now you want to convert all the camera directions and positions into the case you prefer.
It's way faster writing code for you to do that.
What you got there is just the bases for doing it.
13 replies
Manipulating Strings
Strings in C# are immutable. Meaning you cannot change the actual string itself, just creating new ones.
So what you want to do is extract the parts you want to change, change them and then rebuild the full string.
You are more or less doing it, but I guess your input should be the original unmodified string. Without any
ToUpper
mixed in there like you did.
There are ways of doing this more efficient, but you should not worry about that right now.13 replies
Inheritance
Ok found the problem and it has nothing to do with inheritance.
Your
constructor
sets the value of the texture
property
, but your setter
sets its value to itself.
The setter
has to set the value of the backing field
(ltexture
) to value
.
While we are at it. You should adhere to the C# format standards. Properties
start with uppercase letters and fields
start lowercase and often even with a underscore.
And if you don't have a special reason for creating a backing field yourself you should use auto properties
.
19 replies