• /r/csharp
  • Using static class to return folders and files for particular objects, should I just return string or FileInfo/DirInfo? How to use :this() with constructor?

    Question1) I'm created a bunch of extension methods in a static class to return files/folders. They do an exists check and create the file/folder if it fails. I've always simply returned a string with the fullpath. But I was trying to plan of future and started return FileInfo/DirInfo objects. Is this a waste? Presently, I'm […]

  • /r/csharp
  • How to acces weather api url information?

    I use void Start() { string url = "http://ift.tt/1KL6TfJ"; WWW www = new WWW(url); StartCoroutine(WaitForRequest(www)); } IEnumerator WaitForRequest(WWW www) { yield return www; // check for errors if (www.error == null) { Debug.Log("WWW Ok!: " + www.text); } else { Debug.Log("WWW Error: " + www.error); } } To get the following information in my console: […]