How to convert the following PowerShell code to C#?
$cred = Get-Credential # User enters logon/password. What's the C# code? $url = "$Api/build/builds?api-version=5.1" # Azure DevOps server (on premise) rest api Invoke-RestMethod $url -Credential $cred
$cred can be acquired from the user’s Windows login (instead of prompting the user to enter the username and password (