SkipWhile() a function that bypass the elements from the sequence till the condition becomes true and will return the rest of the elements of the sequence.
Example 1 : XML data
<Products>
<Product Name="Football"></Product>
<Product Name="Bat"></Product>
<Product Name="Glows"></Product>
<Product Name="Ball"></Product>
<Product Name="Racket"></Product>
<Product Name="Shoes"></Product>
</Products>
Code is as follows:
Import the namespace using System.Xml.Linq; to use LINQ with XML.
XDocument xdoc = new XDocument();
xdoc = XDocument.Load("Product.xml");
var ProductList = (from productList in (from products in xdoc.Descendants("Products")
select products).Descendants("Product")
select productList).SkipWhile(delegate(XElement prdElement)
{ if (prdElement.Attribute("Name").Value == "Glows")
{ return false; } else { return true; }
}).ToList();
foreach (XElement prdElements in ProductList)
{
Console.WriteLine("Product Name : {0} " , prdElements.Attribute("Name").Value);
}
Check the delegate written for SkipWhile has XElement delegate(XElement prdElement) parameter.
The parameter given depends on the output given from the Linq statement., in this case it is XElement
Here, it will skip the below elements
<Product Name="Football"></Product>
<Product Name="Bat"></Product>
and will return the elements as shown below:

Example 2 : Array of Integers
Import using System.Linq; to use LINQ features with other data types
Here the input data is array of integers as shown below:
//Input Data
int[] data = new int[] { 1, 11, 2, 22, 3, 33, 4, 5, 11, 12, 13, 14, 15, 16 };
//Use Linq to get the result
int[] calculateOutput = data.SkipWhile(delegate(int number)
{ if (number > 14) { return false; } else { return true; } }).ToArray();
Console.WriteLine("Following is the data:");
foreach (int i in calculateOutput)
{
Console.Write("{0}, ", i);
}
Console.WriteLine("");
The delegate has a delegate(int number) parameter and it will skip till it find the first occurs of number > 14 and then it will store the rest of the data in array calculateOutput
The output is as follows:
Hope this will help using feature SkipWhile().
Thank You.
Santosh