https://github.com/marcominerva/schrodinger
Like the famous paradox, a .NET type that can be any value until you check it.
https://github.com/marcominerva/schrodinger
Last synced: about 1 year ago
JSON representation
Like the famous paradox, a .NET type that can be any value until you check it.
- Host: GitHub
- URL: https://github.com/marcominerva/schrodinger
- Owner: marcominerva
- License: gpl-2.0
- Created: 2015-07-26T13:06:02.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2022-07-04T15:37:05.000Z (almost 4 years ago)
- Last Synced: 2025-03-24T01:13:34.005Z (about 1 year ago)
- Language: C#
- Size: 18.6 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Schrodinger Type
Like the famous [paradox](https://en.wikipedia.org/wiki/Schr%C3%B6dinger%27s_cat), a .NET type that can be any value until you check it.
**Usage**
var s = new Schrodinger();
var val = s.Value;
**Value** is a dynamic property. Until you don't access it, it can assume any value (all base types, DateTime, DateTimeOffset, TimeSpan, Guid or even object). Once you read it, it will always have the same value.