Posts

Showing posts from September, 2012

Difference Between ArrayList and Generic.List C#/VB.Net

Hi, Last few Days, I learnt a very basic and important thing about  that ,When one should go for ArrayList or Generic.List in coding......On basis of that, I found  few difference between both. ArrayList Its comes under System.Collections namespace. Its contains Array of Object.i.e Any objects type we can store in a ArrayList.We can store any no. of objects at runtime. ArrayList aryList= new ArrayList(); // No Need to specify the object type,can store anything arList.Add(1); arList.Add("Shubhank"); arList.Add("False"); We can store any objects in ArrayList and can retrieve only Objects from ArrayList... We can say that ArrayList is not Type-Safe .At the Time of inserting recods ,we can store any type of objects,but at the time of fetching we can't be sure that  Values  which are populate by arList (ArrayList object ) of what type..however.. we have to following code while fetching records/items from Array list foreach(Object o in arList) { ....

How to do debug in Web Services

Image
Hello All, I learnt new thing ,how to debug in Web Services, earlier i have used log (txt) to see where my services failed,but now I got new way.Hence I would like share this with all of you.... :) steps - 1) Create a new TestWebservice (File->New Project->ASP.Net Web Service Application) steps - 2) Create a public new method with [webmethod] attribute say " int return type Calculations method accepting two inputs and a calculations class (note set breakpoint in calculation method ) Services.asmx.cs Calculations.cs steps -4) Now run the web services and you will see URL in browser like  http://localhost:49623/Service1.asmx steps -5) Now create a new TestClientWebapplications a new website (File->New Project->WebSite) have a button (btncallWebserices) ,Text=CallWebService and on it click event call the web services ( before that u need to Add a Web References add url above). steps -6) Set breakpoint on btnclick event method run application and then cl