2014-02-19 1 views
-2

내 프로그램에 도움이 필요합니다! 다음은 오류 사진입니다. http://gyazo.com/98c1c7928d7f2d28404d884b35d79426잘못된 표현식 '}'

도와주세요!

감사합니다.

코드 :

당신의 문제는 바로 여기
public partial class Form1 : Form 
{ 
    public Form1() 
    { 
     InitializeComponent(); 
    } 

    private void Form1_Load(object sender, EventArgs e) 
    { 

    } 

    private void button7_Click(object sender, EventArgs e) 
    { 
     Assembly asm = Assembly.GetExecutingAssembly(); 
     string ver = asm.FullName; 
     string number, link; 
     number = webBrowser1.Document.GetElementById("number").GetAttribute("https://www.dropbox.com/home/Thin%20Mints?select=Verison.txt"); 
     link = webBrowser1.Document.GetElementById("link").GetAttribute("value"); 
     if (number == ver) 
      MessageBox.Show("Thin Mints is up to date!"); 
     else 
      System.Diagnostics.Process.Start(https://dl-web.dropbox.com/get/Thin%20Mints/Thin%20Mints%20v2.rar?_subject_uid=269202413&w=AAAASfY9pz0ue_YbjXxaNHFQ4g5EGHokTzlRpAGlFrKIsQ&dl=1);  
    } 
} 
+3

당신이 System.Diagnostics.Process.Start''에 제공하는 URL : 당신의 URL는 //가 포함되어 있기 때문에 주소가 );

가 그냥 몇 가지 인용 부호를 포함 코멘트와 엉망 당신의 닫는 중괄호로 볼 수 있습니다 스스로를 인용하지 않을 것이다 ... –

답변

1

:

System.Diagnostics.Process.Start(https://dl-web.dropbox.com/get/Thin%20Mints/Thin%20Mints%20v2.rar?_subject_uid=269202413&w=AAAASfY9pz0ue_YbjXxaNHFQ4g5EGHokTzlRpAGlFrKIsQ&dl=1); 

당신은 (C#을가 String하지 않는 한 같은 문자열을 인식하지 못합니다 인용 부호의 매개 변수에 문자열을 넣을 필요 따옴표로 묶음) :

System.Diagnostics.Process.Start("https://dl-web.dropbox.com/get/Thin%20Mints/Thin%20Mints%20v2.rar?_subject_uid=269202413&w=AAAASfY9pz0ue_YbjXxaNHFQ4g5EGHokTzlRpAGlFrKIsQ&dl=1"); 
0

URL은

0123입니다.
System.Diagnostics.Process.Start(https://dl-web.dropbox.com/get/Thin%20Mints/Thin%20Mints%20v2.rar?_subject_uid=269202413&w=AAAASfY9pz0ue_YbjXxaNHFQ4g5EGHokTzlRpAGlFrKIsQ&dl=1); 

은 따옴표로 묶지 않습니다.

3

Process.Start은 문자열을 입력으로 사용합니다. 여기에서는 따옴표없이 원본 텍스트를 직접 전달합니다.

Process.Start("https://dl-web.dropbox.com/get/Thin%20Mints/Thin%20Mints%20v2.rar?_subject_uid=269202413&w=AAAASfY9pz0ue_YbjXxaNHFQ4g5EGHokTzlRpAGlFrKIsQ&dl=1");  
관련 문제