• USA : +1 973 910 5725
  • INDIA: +91 905 291 3388
  • info@tekslate.com
  • Login

SilverLight LINQ Integration

Linq queries are used to filtering the data and formatting the data.

The Microsoft introduced linq concept in the 3.0 .net framework, the linq queries designed based on anonymous variables and generic classes

As per .net technologies ‘var’ is anonymous data type, in the anonymous variables we can maintain value format data and reference format data.

The linq queries we can inhelit to the ‘object,’ ‘ADO . net’ and “XML”

Example on Silverlight linq Integration

(Retaining greater than 5 array elements from the arraylist)

Open new silverlight application

  • Add list box and button control
  • Go to button click event

Private void button :- click (object sender, routed Event agrs e)

{

Int [] a = {1,5,8,3,6,9,4,22,25,2,7};

Var x = from I in a where  i> 5 select I ;

For each (var v in x)

{

List box1. Items. Add (v. tostring ());

}

}

Formatting string array elements

Open new silverlight application

Add listbox and button control

Go to button click event

Private void button 1_click (object sender, routed event arge e)

{

String [] x = { “asd”, “zkd”, “poi”, “aad”, “tyu”, “klm:};

Var str = from I in x order by I as ceding select I ;

Foreach (var v in str)

{list box 1.items add (v.to string ());

}

}

Summary
Review Date
Reviewed Item
SilverLight LINQ Integration
Author Rating
5

“At TekSlate, we are trying to create high quality tutorials and articles, if you think any information is incorrect or want to add anything to the article, please feel free to get in touch with us at info@tekslate.com, we will update the article in 24 hours.”

0 Responses on SilverLight LINQ Integration"

Leave a Message

Your email address will not be published. Required fields are marked *

Site Disclaimer, Copyright © 2016 - All Rights Reserved.