using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.Collections;
using System.Drawing;namespace CustomerControl
{
public class MyListView2 : ListView
{
public int xxx
{
get
{
return xxx;
}
set
{
xxx = value;
}
}
} }
将这段代码写进一个cs文件,编译后会在工具栏中出现,点击后,往form里放,vs直接关闭了!
求解!!!!
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.Collections;
using System.Drawing;namespace CustomerControl
{
public class MyListView2 : ListView
{
public int xxx
{
get
{
return xxx;
}
set
{
xxx = value;
}
}
} }
将这段代码写进一个cs文件,编译后会在工具栏中出现,点击后,往form里放,vs直接关闭了!
求解!!!!
应该这样写
private int _xxx;
public int xxx
{
get {return _xxx};
set {_xxx=value};
}
你想想看,你这样写是不是一直在set;