以下是我在调试时遇到的错误:
错误 1 字符文字中的字符过多 错误 2 'System.Windows.Forms.WebBrowser.Navigate(string)' 的最佳重载方法匹配有一些无效参数 错误 3 参数 1:无法从 'char' 转换为 'string'
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace BroZer
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Reload_Click(object sender, EventArgs e)
{
webBrowser1.Refresh();
}
private void Go_Click(object sender, EventArgs e)
{
webBrowser1.Navigate(textBox1.Text);
}
private void Back_Click(object sender, EventArgs e)
{
webBrowser1.GoBack();
}
private void Forward_Click(object sender, EventArgs e)
{
webBrowser1.GoForward();
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
webBrowser1.Navigate('https://www.google.com/search?&ie=UTF-8&q= + (textBox1.Text)');
}
private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
}
}
}
所有错误都在第 41 行。