Fedora Linux Support Community & Resources Center
  #1  
Old 26th August 2011, 08:02 AM
bennielor Offline
Registered User
 
Join Date: Aug 2011
Posts: 1
windows_xp_2003firefox
C#.NET Program With LINQ Query

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication8
{
class order
{
int ordid;
private int cusid;
private double cost;
public int OrdID
{
get { return ordid; }
set { ordid = value; }
}
public int CusID
{
get { return cusid; }
set { cusid = value; }
}
public double Cost
{
get { return cost; }
set { cost = value; }
}
}
class Program
{
static void Main(string[] args)
{
var Orders = new List<order>
{
new order{OrdID=1,CusID=1466,Cost=2453.67},
new order{OrdID=2,CusID=4566,Cost=5553.78},
new order{OrdID=3,CusID=1768,Cost=1344.35},
new order{OrdID=4,CusID=1775,Cost=4565.34},
new order{OrdID=5,CusID=1456,Cost=9069.78},
new order{OrdID=6,CusID=2562,Cost=3245.39}
};
var found = from o in Orders
where o.CusID == 2562
select new { o.Cost, o.OrdID };
foreach (var res in found)
Console.WriteLine(res.OrdID.ToString() + " " + res.Cost.ToString());
}
}
}
.........
Find Latest Job Openings
__________________
Software Testing Training
Reply With Quote
Reply

Tags
c#net, linq, program, query

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mysql-Query-Browser like program for Fedora 15? Vector Using Fedora 3 7th June 2011 11:43 PM
System stability affected by program after program has been closed...? DennyCrane Using Fedora 0 29th June 2008 01:53 AM
Reading output from program, called inside another program clearer Programming & Packaging 2 20th February 2008 08:52 AM
how to use shell program parameters in java program?? srujanabobba Using Fedora 1 10th August 2006 07:24 PM
FTP Query jeffers Using Fedora 3 15th June 2005 12:22 AM


Current GMT-time: 15:15 (Monday, 20-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat