I'm writing a Web service in Asp.net C#, i need to validate field in web service itself, how i can do that? i have given small example below


public class Pack{
public double Weight { get; set; }
public double Height { get; set; }
}

[WebMethod]
public string CreateShip(Pack pk){

List<Ship> Sh = new List<Ship>();
sh.weight=pk.Weight;

}


Here List coming from third party api, I'm assigning weight to third party weight property but in third party they only accept 50kg, so while assigning i need to check weight in web service how i can do that?