mirror of
https://github.com/Smaug123/WoofWare.PawPrint
synced 2025-10-13 01:28:40 +00:00
24 lines
439 B
C#
24 lines
439 B
C#
public class Program
|
|
{
|
|
public class Outer
|
|
{
|
|
public class Inner
|
|
{
|
|
public int Value { get; set; }
|
|
}
|
|
}
|
|
|
|
public static int Main(string[] args)
|
|
{
|
|
Outer.Inner inner = new Outer.Inner { Value = 42 };
|
|
|
|
// Cast nested type to object
|
|
object obj = (object)inner;
|
|
|
|
// Cast back
|
|
Outer.Inner casted = (Outer.Inner)obj;
|
|
|
|
return casted.Value;
|
|
}
|
|
}
|