DCDheeraj Chopraindheerajchopra.hashnode.dev·Aug 17, 2021 · 1 min readTo test if object implements interface in C# - Pattern matching overviewIs there anyway of testing if an object implements a given interface in C#? Solution: Solution 1:If you want to use the typecasted object after the check:Since C# 7.0: if (obj is IMyInterface myObj) This is the same as IMyInterface myObj = obj as I...00
DCDheeraj Chopraindheerajchopra.hashnode.dev·Jun 13, 2021 · 1 min readConnect-AzAccount : The term 'Connect-AzAccount' is not recognized as the name of a cmdletIf you are facing this issue, please read below for the resolution. Issue Occurence Above issue occured, when I was connecting to Azure using VsCode through its terminal. I actually wanted to run my .ps1 script (powershell script) in Azure Cloud shel...00