Skip to content

Instantly share code, notes, and snippets.

@s2kw
Last active February 3, 2016 08:07
Show Gist options
  • Save s2kw/6519978 to your computer and use it in GitHub Desktop.
Save s2kw/6519978 to your computer and use it in GitHub Desktop.
Inherit Nested Class.
using UnityEngine;
using System.Collections;
public class Base : MonoBehaviour{
protected class State
{
const int cddc = 0;
}
}
using UnityEngine;
using System.Collections;
public class Inherited : Base
{
private class State:Base.State
{
const int abba = 100;
}
State s;
public Inherited():base(){
s = new State();
}
public int Member(){
return s.abba;
}
public int OldMember(){
return s.cddc;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment