Results 1 to 3 of 3

Thread: Search for a specific object in a List<Tag> in .NET

  1. #1
    Brownchris is offline Senior Member
    Join Date
    Dec 2009
    Posts
    331
    Rep Power
    3

    Default Search for a specific object in a List<Tag> in .NET

    I am MCA student. I am learning C# programming language. I lately start learning how to use list. I want to know that How to search for a particular object in a List<Tg>? I want code of it. Can anybody know how to search for a particular object in a List<Tg> in ASP.NET? If you are having any suggestions then reply me. Thanks in advanced.

  2. #2
    Millerjames is offline Senior Member
    Join Date
    Dec 2009
    Posts
    331
    Rep Power
    3

    Default

    It is very easy to search for a specific. Object in a List<T> using ASP.NET program. You have to use for loop in your code to do this. I use List<Tg>.Find Index to do this. Just use this code in your program. It will fix your problem.

    Code:
    For Loop
    For Each Loop
    While Loop
    List<Tg>.Contains 
    List<Tg>.Find Index 
    List<Tg>.FindIndex
    LINQS

  3. #3
    Davisricky is offline Senior Member
    Join Date
    Dec 2009
    Posts
    331
    Rep Power
    3

    Default

    I suggest you to refer following example of List<Tg>, which will give you something idea about the use of this tags. I have pass object of class to buttons1_Click event to do this. Just try to understand it.

    Code:
     private void buttons1_Click(object senders, EventArgs es)
            {
                lstsRectss.Clear();
                for (int intRCounts = 0; intRCounts < 2500; intRCounts++)
                {
                    for (int intCCounts = 0; intCCounts < 2500; intCCounts++)
                    {
                        lstsRectss.Add(new Rectangle(intRCounts, intCCountss, 12, 12));
                    }
                }
                Console.WriteLine("Listcounts: " + lstsRectss.Count.ToString());
            }

Similar Threads

  1. Specific Lines of text
    By MartinWilson in forum Programming
    Replies: 1
    Last Post: 02-02-2010, 05:52 PM
  2. How to Backup Internet Explorer 7 Search Providers List:
    By Fabian Nadal in forum Windows Vista
    Replies: 0
    Last Post: 10-14-2009, 10:51 AM
  3. Deleting individual search terms from the AutoComplete list
    By andressa143 in forum General Internet Terms
    Replies: 0
    Last Post: 03-14-2009, 10:07 AM
  4. Defining specific ruLes
    By magreat in forum Everything Else
    Replies: 0
    Last Post: 02-23-2009, 10:54 AM
  5. Can't connect to one specific site.
    By chreshel in forum General Internet Terms
    Replies: 0
    Last Post: 02-03-2009, 04:25 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
SEO by SubmitEdge

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48