Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
sdfsdfs
using System; public struct Point { public Point(byte tag, double x, double y) => (Tag, X, Y) = (tag, x, y); public byte Tag { get; } public double X { get; } public double Y { get; } } public class SizeOfOperator { public static void Main() { Console.WriteLine(sizeof(byte)); // output: 1 Console.WriteLine(sizeof(double)); // output: 8 DisplaySizeOf<Point>(); // output: Size of Point is 24 DisplaySizeOf<decimal>(); // output: Size of System.Decimal is 16 unsafe { Console.WriteLine(sizeof(Point*)); // output: 8 } } static unsafe void DisplaySizeOf<T>() where T : unmanaged { Console.WriteLine($"Size of {typeof(T)} is {sizeof(T)}"); } }
run
|
edit
|
history
|
help
0
Print 1 to 100 without using loop
Operators
Roman to Arabic number conversion without semantic control
Types demo
smallestof3
Prsonal informashin
Main4-1
Fórum ➡ Aggregating 2 compatible dictionaries, using LINQ ♦
SquareRealMatrixWithMathJax
sdfghjuyhtgrfedsdf