我得到编译错误,因为第一行可以为我修复它吗? [英] i get compilation error due to the first line can u fix it up for me?
本文介绍了我得到编译错误,因为第一行可以为我修复它吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="UserDetailsScreen.aspx.cs" Inherits="website4_UserDetailsForm" %>
namespace website4
using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Drawing;
using System.Data;
{
public class UserDetailsForm
{
推荐答案
移动命名空间
使用行在之后行,或者在开放卷曲之后使用
语句移动托架。但是首先在文件中使用行
更为正常。
错字:noamrl表示正常 - OrignalGriff [/ edit]
Move thenamespace
line to after theusing
lines, or move theusing
statements to after the open curly bracket. But it''s more normal to have theusing
lines first in the file.
[edit]Typo: "noamrl" for "normal" - OrignalGriff[/edit]
解决方案2的代码是正确的,但这不是唯一的选择。你的问题不是之前或之后,而是括号。您还可以这样做:
The code of Solution 2 is correct, but this is not the only option. You problem is not "before" or "after", but brackets. You also can do:
namespace website4 {
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
//...
} // namespace website4
别忘了删除未使用的使用; Visual Studio有一个菜单项...在它之前,不要忘记删除未使用的引用。
命名空间应该在使用语句之后
namespace should after Using Statement
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace website4
{
这篇关于我得到编译错误,因为第一行可以为我修复它吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文