Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created July 2, 2021 15:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjoerntx/96a43c25a7d6d69e9c7e78fd3b1c3ee7 to your computer and use it in GitHub Desktop.
Save bjoerntx/96a43c25a7d6d69e9c7e78fd3b1c3ee7 to your computer and use it in GitHub Desktop.
public static bool WriteValue(string username, FormField[] formFields) {
List<Deployment> deployments = GetDeployments();
foreach (Deployment deployment in deployments) {
if (deployment.Username == username) {
deployment.FormFields = formFields;
System.IO.File.WriteAllText("App_Data/deployments.json",
JsonConvert.SerializeObject(deployments));
return true;
}
}
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment