web-services Web Service Output in List format or DataTable Format


    /// <summary>
        /// Post Method with Input/ data to post in JSON format Or you can send dictionary as shown in previous methods
        /// </summary>
        /// <returns> Json formated data </returns>
        public DataTable  GetJsonData6()
            IOperations _Obj = ClsOperations.GetOperations();
            string url = "";
            string inputjson = "{\"@FirstParameter\": \"Value1\",\"@SecondParameter\": \"Value2\",\"@ThirdParameter\": \"Value3\"}";
            IEnumerator objIEnumerator = _Obj.GetJsonEnumerableResult(url, null, inputjson);
            // you can perform further operations on it

            // If you want to convert it in Datatable / List

            List<ClsMyPropertyClass> lst = new List<ClsMyPropertyClass>();
            while (objIEnumerator.MoveNext())
// Upto this you will get List , and you can perform operations on it

            // Now if youu want result in datatable, here i written function for List to datatable conversion
            return CommonServiceCall.ToDataTable(lst);