Skip to content

Instantly share code, notes, and snippets.

View GuilhermeMatheus's full-sized avatar
🐶
Wolf

Guilherme Matheus Costa GuilhermeMatheus

🐶
Wolf
View GitHub Profile
@GuilhermeMatheus
GuilhermeMatheus / AnotherOne.cs
Last active October 3, 2018 01:08
C# Deconstruct Playground
class Foo
{
static void Bar(Foo c)
{
(int x, int y) = c; // fails
c.Deconstruct(out int x2, out int y2); // succeeds
_ = c.Deconstruct(out int x3, out int y3); // fails due to void return
}
public void Deconstruct<T>(out T a, out T b)
using Microsoft.CSharp.RuntimeBinder;
public class C
{
[CompilerGenerated]
private static class CallSiteWrapper
{
public static CallSite<Func<CallSite, object, object>> CallFunc;
public static void InitializeCallFuncIfNull()
@GuilhermeMatheus
GuilhermeMatheus / Programa.cs
Created March 15, 2018 13:32
Usando PauseTokenSource e PauseToken para notificar pausas em Tasks.
using System;
using System.Threading;
using System.Threading.Tasks;
/// <summary>
/// Classe de teste do PauseTokenSource e PauseToken
/// </summary>
class Program
{
static void Main()
@GuilhermeMatheus
GuilhermeMatheus / ReplaceMachine.cs
Created May 30, 2016 19:52
An optimized method to diacritics removal. Ugly code, but much faster than regex.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Costa.Utils.Text
{
public static class ReplaceMachine
{
@GuilhermeMatheus
GuilhermeMatheus / TEC Proposal
Last active November 10, 2015 18:26
Material Design Lite components demo
TEC Proposal with Material Design Lite components demo
------------------------------------
A [Pen](http://codepen.io/anon/pen/YyRQPE) by [Captain Anonymous](http://codepen.io/anon) on [CodePen](http://codepen.io/).
[License](http://codepen.io/anon/pen/YyRQPE/license).