请帮助继续获取form1的类型或命名空间 [英] please help keep getting type or namespace not found for form1
问题描述
使用System;
使用System.Collections.Generic;
使用System.ComponentModel;
使用System.Data;
使用System.Drawing;
使用System.Linq;
使用System.Text;
使用System.Threading.Tasks ;
使用System.Windows.Forms;
命名空间WindowsformsApplication1
{
&NBSP; public partial class< g class =" gr_ gr_21 gr-alert gr_gramm gr_inline_cards gr_run_anim Style multiReplace"数据-GR-ID =" 21" id =" 21"> Form1:< / g>表格
&NBSP; {
&NBSP; &NBSP; &NBSP; public Form1()
&NBSP; &NBSP; &NBSP; {
&NBSP; &NBSP; &NBSP; &NBSP; &NBSP; InitializeComponent();
&NBSP; &NBSP; &NBSP; }
&NBSP; &NBSP; &NBSP; private void textBox2_TextChanged(object sender,EventArgs e)
&NBSP; &NBSP; &NBSP; {
$
&NBSP; &NBSP; &NBSP; }
&NBSP; &NBSP; &NBSP; private void Form1_Load(object sender,EventArgs e)
&NBSP; &NBSP; &NBSP; {
$
&NBSP; &NBSP; &NBSP; }
&NBSP; &NBSP; &NBSP; private void button2_Click(object sender,EventArgs e)
&NBSP; &NBSP; &NBSP; {
&NBSP; &NBSP; &NBSP; &NBSP; &NBSP; this.Close();
&NBSP; &NBSP; &NBSP; }
&NBSP; &NBSP; &NBSP; private void button1_Click(object sender,EventArgs e)
&NBSP; &NBSP; &NBSP; {
&NBSP; &NBSP; &NBSP; &NBSP; &NBSP; this.Hide();
&NBSP; &NBSP; &NBSP; &NBSP; &NBSP;表格ss = new Form();
&NBSP; &NBSP; &NBSP; &NBSP; &NBSP; ss.Show();
&NBSP; &NBSP; &NBSP; }¥b $ b &NBSP; }
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsformsApplication1
{
public partial class <g class="gr_ gr_21 gr-alert gr_gramm gr_inline_cards gr_run_anim Style multiReplace" data-gr-id="21" id="21">Form1 :</g> Form
{
public Form1()
{
InitializeComponent();
}
private void textBox2_TextChanged(object sender, EventArgs e)
{
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void button2_Click(object sender, EventArgs e)
{
this.Close();
}
private void button1_Click(object sender, EventArgs e)
{
this.Hide();
Form ss = new Form();
ss.Show();
}
}
推荐答案
首先,这一行......
For a start, this line ...
&NBSP; public partial class< g class =" gr_ gr_21 gr-alert gr_gramm gr_inline_cards gr_run_anim Style multiReplace"数据-GR-ID =" 21" id =" 21"> Form1:< / g>表格
public partial class <g class="gr_ gr_21 gr-alert gr_gramm gr_inline_cards gr_run_anim Style multiReplace" data-gr-id="21" id="21">Form1 :</g> Form
...是垃圾。它应该只读"公共部分类Form1:表单"。
... is rubbish. It should read just "public partial class Form1 : Form".
但这可能只是在您将代码发布到论坛时搞乱了格式。
But that might just be that you messed up the format when you posted your code to the forum.
除此之外,我看不到会产生错误的任何内容。你能发布确切的错误信息吗?如果可能的话,它会发生什么行?
Aside from that, I can't see anything which would produce that error. Can you post the exact error message, and if possible what line it is occurring on?
这篇关于请帮助继续获取form1的类型或命名空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!