Click here to Skip to main content
15,896,111 members
Home / Discussions / C#
   

C#

 
Questionwinform Pin
aurelcly3-Feb-10 2:55
aurelcly3-Feb-10 2:55 
AnswerRe: winform Pin
Luc Pattyn3-Feb-10 2:57
sitebuilderLuc Pattyn3-Feb-10 2:57 
AnswerRe: winform Pin
Not Active3-Feb-10 2:59
mentorNot Active3-Feb-10 2:59 
AnswerDon't repost Pin
Not Active3-Feb-10 3:01
mentorNot Active3-Feb-10 3:01 
QuestionWinforms and SQL Threading Problem [modified] Pin
Uray Frank3-Feb-10 1:32
Uray Frank3-Feb-10 1:32 
AnswerRe: Winforms and SQL Threading Problem Pin
Luc Pattyn3-Feb-10 1:51
sitebuilderLuc Pattyn3-Feb-10 1:51 
GeneralRe: Winforms and SQL Threading Problem Pin
Uray Frank3-Feb-10 2:45
Uray Frank3-Feb-10 2:45 
GeneralRe: Winforms and SQL Threading Problem Pin
Luc Pattyn3-Feb-10 2:53
sitebuilderLuc Pattyn3-Feb-10 2:53 
GeneralRe: Winforms and SQL Threading Problem Pin
Uray Frank3-Feb-10 3:20
Uray Frank3-Feb-10 3:20 
AnswerRe: Winforms and SQL Threading Problem Pin
Luc Pattyn3-Feb-10 3:49
sitebuilderLuc Pattyn3-Feb-10 3:49 
GeneralRe: Winforms and SQL Threading Problem Pin
Uray Frank3-Feb-10 4:07
Uray Frank3-Feb-10 4:07 
GeneralRe: Winforms and SQL Threading Problem Pin
Luc Pattyn3-Feb-10 4:12
sitebuilderLuc Pattyn3-Feb-10 4:12 
GeneralRe: Winforms and SQL Threading Problem Pin
Uray Frank3-Feb-10 4:18
Uray Frank3-Feb-10 4:18 
GeneralRe: Winforms and SQL Threading Problem Pin
Luc Pattyn3-Feb-10 4:29
sitebuilderLuc Pattyn3-Feb-10 4:29 
GeneralRe: Winforms and SQL Threading Problem Pin
Uray Frank3-Feb-10 4:30
Uray Frank3-Feb-10 4:30 
GeneralRe: Winforms and SQL Threading Problem Pin
Luc Pattyn3-Feb-10 4:36
sitebuilderLuc Pattyn3-Feb-10 4:36 
GeneralRe: Winforms and SQL Threading Problem Pin
Uray Frank3-Feb-10 4:45
Uray Frank3-Feb-10 4:45 
GeneralRe: Winforms and SQL Threading Problem Pin
Luc Pattyn3-Feb-10 5:12
sitebuilderLuc Pattyn3-Feb-10 5:12 
QuestionLINQ to parse EventLog Query [modified] Pin
Sunil G3-Feb-10 1:11
Sunil G3-Feb-10 1:11 
AnswerRe: LINQ to parse EventLog Query Pin
Ravi Bhavnani3-Feb-10 2:01
professionalRavi Bhavnani3-Feb-10 2:01 
AnswerRe: LINQ to parse EventLog Query Pin
Pete O'Hanlon3-Feb-10 2:14
mvePete O'Hanlon3-Feb-10 2:14 
AnswerRe: LINQ to parse EventLog Query Pin
Palash Biswas3-Feb-10 3:17
Palash Biswas3-Feb-10 3:17 
You can use the below code if you using LINQ to Objects

private void button1_Click(object sender, EventArgs e)
        {
            List<Customer> customers = new List<Customer>();
            customers.Add(new Customer { CustomerID = "A12I", CustomerName = "Palash" });
            customers.Add(new Customer { CustomerID = "B20G", CustomerName = "Ankesh" });
            customers.Add(new Customer { CustomerID = "A100I", CustomerName = "Subhadip" });
            customers.Add(new Customer { CustomerID = "C12G", CustomerName = "Namita" });
            var result = (from c in customers
                          where c.CustomerID.StartsWith("A") && c.CustomerID.EndsWith("I")
                          select c).ToList();
            foreach (Customer c in result)
            {
                MessageBox.Show(c.CustomerName);
            }
        }


    }

    public class Customer
    {
        public string CustomerID;
        public string CustomerName;
    }


for Search A%I . In case Of Search %I% you can use String Contains method to do that

In Case of LINQ to SQL You can Use the Syntax like

var result = (from c in db.Customers
              where System.Data.Linq.SqlClient.SqlMethods.Like(c.CustomerID, "A%I")
              select c).ToList();

Questionmulticolumn listview Pin
Member 5903103-Feb-10 0:41
Member 5903103-Feb-10 0:41 
AnswerRe: multicolumn listview Pin
sanforjackass3-Feb-10 0:57
sanforjackass3-Feb-10 0:57 
AnswerRe: multicolumn listview Pin
OriginalGriff3-Feb-10 1:01
mveOriginalGriff3-Feb-10 1:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.