VS Display Record Counter

Posted on 2012-08-27
Last Modified: 2012-08-31
Using VS C# is there a way to display a record counter as you read through a dataset and perform operations? I do not want to get as involved as using backgroundworker. I just simply want to display a record counter as processes occur in the background. Any sample code would be appreciated.
Question by:rwheeler23
    1 Comment
    LVL 43

    Accepted Solution

    >>Using VS C# is there a way to display a record counter as you read through a dataset and perform operations?

    you mean something like the following where lbl is a label on your form.
    int i = 1;
    foreach(record in rs)
    lbl.Text = i.ToString();
    DoEvents();  //allow message loop to run, else lbl never appears to update

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    26 Experts available now in Live!

    Get 1:1 Help Now