一个初始化的小问题.
这么写就是编译不过的:
public ref struct ABC{ SqlDataAdapter^ commodityInfoDA; DealSuite(int inInt) : commodityInfoDA("SELECT * FROM dbo.commodityInfo WHERE dbo.commodityInfo.commodityID=" + inInt.ToString() + ";", gcnew SqlConnection("Data Source=192.168.1.2\pitsou7;Initial Catalog=ATM_PITSOU7;Integrated Security=false;User ID=sa;Password=123456")) { }}
public ref struct ABC{ SqlDataAdapter^ commodityInfoDA; DealSuite(int inInt) { commodityInfoDA = gcnew SqlDataAdapter("SELECT * FROM dbo.commodityInfo WHERE dbo.commodityInfo.commodityID=" + inInt.ToString() + ";", gcnew SqlConnection("Data Source=192.168.1.2\pitsou7;Initial Catalog=ATM_PITSOU7;Integrated Security=false;User ID=sa;Password=123456")); }}