This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.ComponentModel; | |
using System.Runtime.CompilerServices; | |
using System.Threading.Tasks; | |
using System.Windows; | |
using System.Windows.Input; | |
namespace WPFTestApp | |
{ | |
public partial class Window1 : Window | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Student | |
{ | |
public string Name { get; set; } | |
public enum Gender | |
{ | |
Male, Female | |
} | |
public int Age { get; set; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string[] lString = new string[] { "All", "Apples", null, null }; | |
/* Using an enumerator to step through the array of strings where the values are not null */ | |
IEnumerator enumerator = (from lValue in lString where lValue != null select lValue).ToArray().GetEnumerator(); | |
while (enumerator.MoveNext()) | |
{ | |
Console.WriteLine(enumerator.Current); | |
} | |
/* For each string in the array, select where the value is not null, and do something with the value */ |
OlderNewer