28
1
using System;
2
using System.Linq;
3
using System.Collections.Generic;
4
5
6
public class Program
7
{
8
public static void Main()
9
{
10
// string collection
11
IList<string> stringList = new List<string>() {
12
"C# Tutorials",
13
"VB.NET Tutorials",
14
"Learn C++",
15
"MVC Tutorials" ,
16
"Java"
17
};
18
19
// LINQ Method Syntax
20
var result = stringList.Where(s => s.Contains("Tutorials"));
21
22
23
foreach (var str in result)
24
{
25
Console.WriteLine(str);
26
}
27
}
28
}
Cached Result
Unhandled exception. System.UriFormatException: Invalid URI: The format of the URI could not be determined.
at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind, UriCreationOptions& creationOptions)
at System.Uri..ctor(String uriString)
at Program.Main()
Command terminated by signal 6
at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind, UriCreationOptions& creationOptions)
at System.Uri..ctor(String uriString)
at Program.Main()
Command terminated by signal 6