I am trying to find equivalent of C# sizeof(int).
Is this it ?
- Code: Select all
Cobra.Lang.NumericTypeInfo(int).size
Cobra.Lang.NumericTypeInfo(int).size
class X
def main
assert sharp'sizeof(int)' == 4
Computing the Size of a Structure
by Jim Mischel
A while back, I needed some C# code that would determine how much memory an array of a generic type would take. This turns out to be a lot more complicated than I at first thought it would be, because object size can be difficult to determine. Let me start at the beginning.
...
Users browsing this forum: No registered users and 54 guests