Skip to content

Instantly share code, notes, and snippets.

@NMZivkovic
Last active July 4, 2018 21:34
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 NMZivkovic/3198452453d39fb3d66a2de718f3e58b to your computer and use it in GitHub Desktop.
Save NMZivkovic/3198452453d39fb3d66a2de718f3e58b to your computer and use it in GitHub Desktop.
public class WebAccess
{
public async Task<int> AccessRubiksCodeAsync()
{
HttpClient client = new HttpClient();
var getContent = client.GetStringAsync("http://rubikscode.net");
LogToConsole("Yay!");
string content = await getContent;
return content.Length;
}
private void LogToConsole(string message)
{
Console.WriteLine("At the moment I am actually listening to the new NIN song...");
Console.WriteLine("It is pretty cool...like something of David Bowie's - Blackstar.");
Console.WriteLine("message");
}
}
@TheFanatr
Copy link

TheFanatr commented Jul 4, 2018

The message parameter in the LogToConsole method is not being used because it would appear that quotation marks were erroneously placed around it in the last call to Console.WriteLine on line 20.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment