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
FINAL PRIME NUMBER GENERATOR IN C#
Hello
dfrgthyjujyhtgrf
Fórum ➡ Finding STRONG tags that contain UL tags, using Regex class♦
csharp enum
Derived static
Fórum ➡ Example of a "crippled" extension method ♦
*271*271#
Classes, properties, methods, ling begining
saved