soniarose
شنبه 13 شهریور 1389, 18:30 عصر
سلام من میخوام برای ایجاد سبد خرید کلاس cartItemو shopingcart رو در کلاس shoping قرار بدم و نام فضا رو wrox.comerce قرار بدم ولی در قسمت تعیین نام فضا خطا میگیره لطفا کمک کنید
publicclassshoping
{
public shoping()
{namespace Wrox.Commerce
{
[Serializable]
publicclassCartItem
{
privateint _productID;
privatestring _productName;
privatestring _productImageUrl;
privateint _quantity;
privatedouble _price;
privatedouble _lineTotal;
publicvoid New()
{
}
publicvoid New(int ProductID, string ProductName,
string ProductImageUrl, int Quantity, double Price)
{
_productID = ProductID;
_productName = ProductName;
_productImageUrl = ProductImageUrl;
_quantity = Quantity;
_price = Price;
_lineTotal = Quantity * Price;
}
publicint ProductID
{
get
{
return _productID;
}
set
{
_productID = value;
}
}
publicstring ProductName
{
get
{
return _productName;
}
set
{
_productName = value;
}
}
publicstring ProductImageUrl
{
get
{
return _productImageUrl;
}
set
{
_productImageUrl = value;
}
}
publicint Quantity
{
get
{
return _quantity;
}
set
{
_quantity = value;
}
}
publicdouble Price
{
get
{
return _price;
}
set
{
_price = value;
}
}
publicdouble LineTotal
{
get
{
return _quantity * _price;
}
}
}
}
//
// TODO: Add constructor logic here
//
}
}
publicclassshoping
{
public shoping()
{namespace Wrox.Commerce
{
[Serializable]
publicclassCartItem
{
privateint _productID;
privatestring _productName;
privatestring _productImageUrl;
privateint _quantity;
privatedouble _price;
privatedouble _lineTotal;
publicvoid New()
{
}
publicvoid New(int ProductID, string ProductName,
string ProductImageUrl, int Quantity, double Price)
{
_productID = ProductID;
_productName = ProductName;
_productImageUrl = ProductImageUrl;
_quantity = Quantity;
_price = Price;
_lineTotal = Quantity * Price;
}
publicint ProductID
{
get
{
return _productID;
}
set
{
_productID = value;
}
}
publicstring ProductName
{
get
{
return _productName;
}
set
{
_productName = value;
}
}
publicstring ProductImageUrl
{
get
{
return _productImageUrl;
}
set
{
_productImageUrl = value;
}
}
publicint Quantity
{
get
{
return _quantity;
}
set
{
_quantity = value;
}
}
publicdouble Price
{
get
{
return _price;
}
set
{
_price = value;
}
}
publicdouble LineTotal
{
get
{
return _quantity * _price;
}
}
}
}
//
// TODO: Add constructor logic here
//
}
}