0

I am working on a program but i dont want it to be stolen when selling since i'm giving him it first,

i need a way to exit the application if url says for example False,

i tried this:

    var url = "http://example.com/Application.txt";

var textFromFile = (new WebClient()).DownloadString(url);
if(textFromFile.Contains("false")) { Application.Exit(); }

When trieng to debug it gives me alot of errors,

when googling it says that the code is invalid

Qustom
  • 1
  • Don't worry about it. Finish the program first. If someone would copy it might even help the promotion of your program, and you can sell a new and improved version. But don't worry, many people are honest, and especially business are usually careful when it comes to illegal software. Just write good software and add a good license agreement, and you should be fine. – GolezTrol May 02 '16 at 22:44
  • welp, i will not worry as of now, but it will be usefull later thank you for this motivational speach – Qustom May 02 '16 at 22:45

1 Answers1

0

Your code is just fine. I put it into a test project, changed the url to a Lorem ipsum page

So please show debug errors or what you were googling

Hubertus
  • 21
  • 2
  • Well, I don't want to be rude, but I guess you should first learn to program in C#. Did you create a WPF application and did you put your code into the constructor? – Hubertus May 02 '16 at 23:09
  • i managed to create a fully functionalling program that is kinda flawless :/ but then i can't add something simple, hope you know what i mean, i'm also new to c# – Qustom May 03 '16 at 08:40