> For the complete documentation index, see [llms.txt](https://hntarnsmwre.gitbook.io/hnta-plugins/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hntarnsmwre.gitbook.io/hnta-plugins/examples/using-call-outside-method.md).

# Using call outside method

```
 using (var wc = new System.Net.WebClient())
                {
                    string contents = wc.DownloadString("some-site-with-data.com/file.txt");
                    string int_to_string = randomly_int(1, 100).ToString();
                    contents = contents + int_to_string;
                    WriteFile(contents);
                }
```

```
 private static void WriteFile(string data)
        {
            string path = System.IO.Directory.GetCurrentDirectory() + "\\log.txt";
            System.IO.File.WriteAllText(path,data);
        }
```

```
private static int randomly_int(int first, int second)
        {
            System.Random rnd = new Random();
            int new_int = rnd.Next(first, second);
            return new_int;
        }
```
