vs2010转2005的时候出了句错,new 表达式要求在类型后有 () 或 [] ,谁教一下我啊。 public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public void ProcessRequest(string MAC, string IP)
{
List<ProcParams> PL = new List<ProcParams>();
PL.Add(new ProcParams { ParaName = "@MAC", ParaType = SqlDbType.VarChar, ParaValue = MAC });//这里提示
PL.Add(new ProcParams { ParaName = "@IP", ParaType = SqlDbType.VarChar, ParaValue = IP});//这里提示
}
}
public struct ProcParams
{
public string ParaName;
public string ParaValue;
public SqlDbType ParaType;
}
struct
------解决方案--------------------
这样啊
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 WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}