Skip to content

Instantly share code, notes, and snippets.

Avatar

Valerio Sevilla ValerioSevilla

View GitHub Profile
@ValerioSevilla
ValerioSevilla / MethodOverridingDemoUnity.cs
Created Jan 2, 2018
Simple demonstration of how polymorphism through method overriding and hiding works in C# (Unity compatible)
View MethodOverridingDemoUnity.cs
using UnityEngine;
namespace PolymorphismDemo
{
public class A
{
public virtual void Foo() { Debug.Log ("A.Foo()"); }
}
public class B : A
@ValerioSevilla
ValerioSevilla / MethodOverridingDemo.cs
Last active Jan 2, 2018
Simple demonstration of how polymorphism through method overriding and hiding works in C#
View MethodOverridingDemo.cs
using System;
namespace PolymorphismDemo
{
public class A
{
public virtual void Foo() => Console.WriteLine("A.Foo()");
}
public class B : A
@ValerioSevilla
ValerioSevilla / staticBinding.go
Created Mar 28, 2017
Simple code demonstrating static binding in Go
View staticBinding.go
package main
import "fmt"
type Thing interface {
coolify()
coolifyAndShout()
}
type CoolThing struct {
You can’t perform that action at this time.