Skip to content

Instantly share code, notes, and snippets.

@hhyyg-test
hhyyg-test / linq.cs
Created October 26, 2017 11:03
Linq sample
using System;
using System.Linq;
public class Program
{
public static void Main()
{
int[] nums = new int[] { 1, 2, 3, 4 };
var q1 = from a in nums
@hhyyg-test
hhyyg-test / C# 6 exception filter.cs
Created October 26, 2017 11:04
C# 6 exception filter
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp6
{
class Program2
{
@hhyyg-test
hhyyg-test / protocol static method.swift
Created October 28, 2017 03:19
Protocol static method (swift)
protocol Person {
static func memo()
}
class Taro: Person {
static func memo() {
print("taro")
@hhyyg-test
hhyyg-test / Script.csx
Created October 28, 2017 03:20
Script for Controller.cs / Thanks: Dave Glick - Announcing Scripty https://daveaglick.com/posts/announcing-scripty
using Microsoft.CodeAnalysis;
using System.Web;
using System.Linq;
using System.Collections.Generic;
using System.Reflection;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.CSharp.Extensions;