You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
443 B
28 lines
443 B
#if NET20 || NET30 //|| !NET_4_6 |
|
|
|
namespace System.Runtime.CompilerServices |
|
{ |
|
public class StrongBox<T> : IStrongBox |
|
{ |
|
public T Value; |
|
|
|
public StrongBox() |
|
{ |
|
// Empty |
|
} |
|
|
|
public StrongBox(T value) |
|
{ |
|
Value = value; |
|
} |
|
|
|
object IStrongBox.Value |
|
{ |
|
get { return Value; } |
|
|
|
set { Value = (T)value; } |
|
} |
|
} |
|
} |
|
|
|
#endif |