关于get/set的问题
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace haiyang
{
public partial class mytextbox : UserControl
{
Cls_UserManage um = new Cls_UserManage();
dbopt opt = new dbopt();
private string pos_name="";
public string itempos_name
{
get
{
return pos_pos_name.Text;
}
set
{
pos_name = value;
this.pos_pos_name.Text = pos_name;
}
}
private string shipno="";
public string itemshipno
{
get
{
return pos_shipno.SelectedValue.ToString();
}
set
{
shipno = value;
this.pos_shipno.SelectedText = shipno;
}
}
private string studyshipno="";
public string itemstudyshipno
{
get
{
return pos_studyshipno.SelectedValue.ToString();
}
set
{
studyshipno = value;
this.pos_studyshipno.SelectedText = studyshipno;
}
}
private string haishan;
public string itemhaishan
为什么我调用xxx.itemstudyshipno = "xxxx" 就会出现未将对象引用到实例,如何解决这个问题,想不出来了。