So our goal is that if we get a diagnostic warning like
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9GlVbpFWqS4kzRaLoR9PUE5O2pHuhOVAEVPcPydoL5gLMbu-pgFFPfi2d65B7Dx3KKjtHJDDQAEolU_rqT6pNqgAkvahqSQQY6eGUlFebauZazGhgcVChKvMq8sv2oJ4dbRHTgYf379U/s640/Squiggle.png)
we would like our code fix to replace it with something like:
var today = DateTime.Today;
WriteLine(Invariant($"The date is {today}"));
Because I used the 'Analyser With Code Fix' template when creating the solution, I also got a CodeFixProvider into my solution to start with. This is the class where we will be fixing the code by adding the call to Invariant around the interpolated string.