Skip to content

Instantly share code, notes, and snippets.

Avatar

Christian Nagel christiannagel

View GitHub Profile
View Lambdas.cpp
[] {
std::cout << "hello, lambda" << std::endl;
}();
@christiannagel
christiannagel / Program.cs
Created Apr 5, 2013
C# simple lambda expression
View Program.cs
Action l1 = () => Console.WriteLine("Hello, Lambda!");
l1();
@christiannagel
christiannagel / Lambdas.cpp
Created Apr 5, 2013
C++11 lambda no return no parameter
View Lambdas.cpp
auto l1 = [] {
std::cout << "hello, lambda" << std::endl;
};
l1();
@christiannagel
christiannagel / Program.cs
Created Apr 5, 2013
C# Lambda - returning a value
View Program.cs
Func<int> l2 = () => 42;
int x2 = l2();
@christiannagel
christiannagel / Program.cs
Created Apr 5, 2013
C# Lambda returning a value
View Program.cs
Func<int> l2b = () => { return 42; };
int x2b = l2b();
@christiannagel
christiannagel / Lambdas.cpp
Created Apr 5, 2013
C++11 lambda returning a value
View Lambdas.cpp
auto l2 = [] {
return 42;
};
int x2 = l2();
View PageMode enumeration
private enum PageMode
{
NormalMode,
SelectionMode,
EditMode,
ProgressMode,
SelectionProgressMode
}
View VisualStateModeChanger Instance
this.pageModeChanger = new VisualStateModeChanger<PageMode>(this);
@christiannagel
christiannagel / SampleDataGroup
Created Aug 24, 2013
Windows Store App - SampleDataGroup
View SampleDataGroup
public class SampleDataGroup
{
public SampleDataGroup(String uniqueId, String title, String subtitle, String imagePath, String description)
{
this.UniqueId = uniqueId;
this.Title = title;
this.Subtitle = subtitle;
this.Description = description;
this.ImagePath = imagePath;
this.Items = new ObservableCollection<SampleDataItem>();
@christiannagel
christiannagel / SampleDataItem
Created Aug 24, 2013
Windows Store App, Visual Studio Template Code, SampleDataItem
View SampleDataItem
public class SampleDataItem
{
public SampleDataItem(String uniqueId, String title, String subtitle, String imagePath, String description, String content)
{
this.UniqueId = uniqueId;
this.Title = title;
this.Subtitle = subtitle;
this.Description = description;
this.ImagePath = imagePath;
this.Content = content;
You can’t perform that action at this time.