I came across several ways to write business logic in asp.net, but I am interested in 2 examples below, what are the advantages of using a structure to store class variables:
namespace Shopping { public struct ShoppingCart { public string Color; public int ProductId; } public partial class MyShoppingCart { public decimal GetTotal(string cartID) { }
namespace Shopping { public partial class MyShoppingCart { public string Color{ get; set; } public int ProductId{ get; set; } public decimal GetTotal(string cartID) { }
k80sg
source share