Click to Set Next Statement

Many of you may know about the context menu item Set Next Statement (Ctrl+Shift+F10) that moves the yellow arrow (the instruction pointer) to the target line of code. You may also know that you grab and drag the yellow arrow up and down in the gutter to move it. What you probably didn’t know is that as of Visual Studio 2017 version 15,3 Preview there is an even easier way to target a line and Set Next Statement.

1. Hover over the line of code where you want to move the yellow arrow.

2. Hold the CTRL key and notice the Run to Click (Run execution to here) glyph changes into the Set Next Statement glyph.

3. Click on that glyph and the yellow arrow will move to that line.

SetNextStatement

4. This line will be the next statement to execute when taking a step or pressing Continue (F5).

[Source](https://blogs.msdn.microsoft.com/visualstudio/2017/06/26/7-lesser-known-hacks-for-debugging-in-visual-studio/)

ToString() formatting of Guid.NewGuid()


Console.WriteLine(Guid.NewGuid().ToString("n"));

e2fa63581f7642af83321e592e443f20


Console.WriteLine(Guid.NewGuid().ToString("d"));

a307cc65-413e-4d07-ab95-349ce6c313f6


Console.WriteLine(Guid.NewGuid().ToString("p"));

(e27f9b1f-f335-49e6-9ef8-ff7fdfccda3a)


Console.WriteLine(Guid.NewGuid().ToString("b"));

{8786c68f-cf57-4ea2-a956-8c48fc681da6}


Console.WriteLine(Guid.NewGuid().ToString("x"));

{0x6d0df007,0x5e83,0x4293,{0xb3,0x28,0xf1,0x6a,0xa8,0x5b,0xa6,0x61}}

Convert One Generic List to Another Generic List c#

So I came across a need to create a base class that accepted two generics one would be a concrete class and the other would be the interface to that class. The reason for the need to include both as generics is that I was delegating my concrete implementation to Windows Azure.

So, Azure will use my concrete class to store my data and I will retrieve it and pop it into my interface. A problem came up where I could not convert a list of one generic type (concrete) to another (interface).

However I have just discovered a way to convert between two generic lists. What this means is that I can tell azure about my concrete class and it will go ahead and persist my data to the cloud. At the same time I can also expose only the Interface of my concrete implementation to the rest of the system. This means that I can keep all of my instantiation safe and sound in factories where they belong, and also in Azure. 🙂
Read More