Home > .Net > Defining a Readonly property in DataContact WCF

Defining a Readonly property in DataContact WCF

[DataMember(Name = Constants.OrderMaster.SalesTaxCalculated, Order = 24, IsRequired = false, EmitDefaultValue = false)]

public Nullable<System.Decimal> SalesTaxCalculated

{

get

{

if (this.State == Constants.USStates.FL)

{

return (this.OrderDetailTotal – this.PromoDeductions + this.ShippingAdditions) * 0.06m;

}

else

{

return 0;

}

}

//get {return 0;}

private set{ value= null;}

}

Comments are closed.

TOP