Uploaded February 2019 | Updated November 2026, 3 hours ago
One of the greatest tools for development is a really quick turn around between the code you write and seeing the result of that code. When you're working with .NET Core their is a really handy tool that ships with the framework that can enable you to get this kind of feedback significantly faster.
`dotnet watch` is a command that allows you to create a file watcher that will watch the files in your project for new changes and, upon detecting them, rerun the command you specified. For example:
* `dotnet watch run` will rerun your code every time you make a change to your code.
* `dotnet watch build` will rebuild your code with every change
* `dotnet watch test` will run the tests for a test project every time you make a change to a test.
These can be a really handy way to keep your project running during development and constantly testing and trying new features, patterns etc.
While not shown here you may run this with projects like ASP.NET (commands which may not have exited before a new change is detected). In the case of ASP.NET your web server will be restarted so your next request will reflect the latest changes you've made!
Microsoft has a more in depth discussion of the watch command that discusses some of the other features of it and provides additional examples here: docs.microsoft.com/en-us/aspnet/core/tutorials/dotnet-watch
This is a new style I'm trying and I'd love your feedback! Let me know what you think in the comments or in our Discord!
Join the World of Zero Discord: discord.gg/hU5Kq2u
One of the greatest tools for development is a really quick turn around between the code you write and seeing the result of that code. When you're working with .NET Core their is a really handy tool that ships with the framework that can enable you to get this kind of feedback significantly faster.
`dotnet watch` is a command that allows you to create a file watcher that will watch the files in your project for new changes and, upon detecting them, rerun the command you specified. For example:
* `dotnet watch run` will rerun your code every time you make a change to your code.
* `dotnet watch build` will rebuild your code with every change
* `dotnet watch test` will run the tests for a test project every time you make a change to a test.
These can be a really handy way to keep your project running during development and constantly testing and trying new features, patterns etc.
While not shown here you may run this with projects like ASP.NET (commands which may not have exited before a new change is detected). In the case of ASP.NET your web server will be restarted so your next request will reflect the latest changes you've made!
Microsoft has a more in depth discussion of the watch command that discusses some of the other features of it and provides additional examples here: docs.microsoft.com/en-us/aspnet/core/tutorials/dotnet-watch
This is a new style I'm trying and I'd love your feedback! Let me know what you think in the comments or in our Discord!
Join the World of Zero Discord: discord.gg/hU5Kq2u


![Lets Make a Lazy String Parser in C#
Lets create a quick string parsing script that can read a long string and return a delimited set of results (well be finding words). We can use this to iterate through every word in the string until we find the value we are looking for without having to pre-process the entire original string.
A lazily evaluated function is one that calculates the results of the function as the values are requested. In this case it means we can create a set of integers or strings that we generate dynamically without having to first fill an array or other data structure with all the data first. This also means that for large data sets where we will stop iterating early in the list that we can process only parts of the provided data.
C#s `yield` keyword allows us to return a value from a function and then continue from that point in our code on the next iteration. This allows us to iterate through a loop and `yield` results from the inside of the loop to expose new data to the calling function before generating the complete list. Instead, our list is generated procedurally from the code in our function.
Using `yield` we can generate a lazily calculated set of values from an infinite loop.
```csharp
public static IEnumerable˂int˃ PositiveIntegers() {
for(int i = 1; i ˂ int.MaxValue; ++i) {
yield return i;
}
}
// We can print the first ten elements in the set of positive integers without
// looping through the complete set of integers.
public static void Main(string[] args) {
foreach(var number in PositiveIntegers().Take(10)) {
Console.WriteLine(number);
}
}
```
To create our lazy string parser well use the concepts above but introduce a few extra steps. Were going to step through an input string character by character to form words. When a delimiter character is found well yield the word weve found so far and then reset that word. When the next word is queried from the `IEnumerable` well repeat the process. This will keep going until we stop iterating over the `IEnumerable` result of the function or we reach the end of the function.
Our lazy string parser implementation looks like this:
```csharp
public static IEnumerable˂string˃ Parse(string content, char delimiter) {
var word = String.Empty;
foreach(var character in content) {
if (character delimiter) {
if (word != String.Empty) {
var result = word;
word = String.Empty;
yield return result;
}
} else {
word += character;
}
}
yield return word;
}
```
***
Learn more about using `yield` with more examples in this video: https://www.youtube.com/watch?v=bsZjfuTrPSA
Join the World of Zero Discord Server: https://discord.gg/hU5Kq2u
***
The thumbnail of this video includes a modified image of [Duke Humfreys Library](https://commons.wikimedia.org/wiki/File:Duke_Humfreys_Library_Interior_3,_Bodleian_Library,_Oxford,_UK Diliff.jpg). This file is licensed under the [Creative Commons Attribution-Share Alike 3.0 Unported](https://creativecommons.org/licenses/by-sa/3.0/deed.en) license. Lets Make a Lazy String Parser in C#](https://i.ytimg.com/vi/pauxOqYU038/mqdefault.jpg)


 or my video that covers using [Unity Quaternion operators](https://worldofzero.com/videos/rotation-math-tricks-using-unitys-quaternion-operators/).
Gimble locking occurs when two or more of the axis of rotation align with one another causing the available rotations the object can take to be limited (multiple rotations cause the same overall effect on the object). You can learn more about this effect on Wikipedia: https://en.wikipedia.org/wiki/Gimbal_lock
Ive been a big fan of 6DoF games since I was really young and draw a lot of inspiration from games like Descent, Overload and more. The style of games are really fun and I highly recommend giving one a try if youve never played one before.
Join the World of Zero Discord Server: https://discord.gg/hU5Kq2u Live Coding a Basic 6 Degree of Freedom Flight Controller](https://i.ytimg.com/vi/sCSnitP6xPo/mqdefault.jpg)




The end result of this is will allow us to tweak the radius, location, inside and outside color of the circle we draw in world space. This allows us to do a lot more than we could previously even though we havent really added that many new features. We also migrate to use an unlit shader instead of using the default PBR shader. This is new compared to our original surface shader and is closer to the end result were trying to build. An unlit shader ignores lighting in the scene including things like global illumination and allows us to get a single consistent color across the entire surface our shaders material is applied to.
The World of Zero Discord Server: https://discord.gg/hU5Kq2u Using Properties and Steps in Part 2 of our Ripple in Shader Graph](https://i.ytimg.com/vi/tL3GbBAqF3E/mqdefault.jpg)
