Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Using Environment variables to access API key values
using System;
namespace MyAnimeListSharp.Auth
public class CredentialContext : ICredentialContext
public string UserName { get; set; } =
Environment.GetEnvironmentVariable("Project_MyAnimeList.UserName", EnvironmentVariableTarget.User);
public string Password { get; set; } =
Environment.GetEnvironmentVariable("Project_MyAnimeList.Password", EnvironmentVariableTarget.User);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment