In my RESTful WCF web service I have something like the following response object.public class WebResponse<T>{         public bool Success { get; set; }        public T Data { get; set; }            public string ErrorMessage { get; set; }}    This way I can capture any errors that occur during the request to the web service. It also separates the data object from the response object. Another way this could be done is with a response base class like this.public abstract class WebResponseBase{        public bool Success { get; set; }        public string ErrorMessage { get; set; }}public class CarResponse : WebResponseBase{        public string Manufacturer { get; set; }        public string Make { get; set; }}I personally prefer the first method as it gives me a clear separation of the data and the response/error status and allows me to easily return lists/arrays etc. without having to create multiple classes. Are there any benefits to using the base class? Are there any limitations to using the generic class?
Should web service response use a base class or generic class?
c#;web services;rest;wcf;json