Skip to content
Discussion options

You must be logged in to vote

The shorthand for inlining is nice - but it should be done by the compiler automatically...

The second part you can write today as:

using System;
using System.Runtime.CompilerServices;

float num = 1;
var numRaw = Unsafe.As<float, int>(ref num);
Console.WriteLine(numRaw);

Replies: 2 comments 9 replies

Comment options

You must be logged in to vote
4 replies
@dylanrafael05
Comment options

@CyrusNajmabadi
Comment options

@ufcpp
Comment options

@Joe4evr
Comment options

Comment options

You must be logged in to vote
5 replies
@dylanrafael05
Comment options

@bernd5
Comment options

@orthoxerox
Comment options

@HaloFour
Comment options

@bernd5
Comment options

Answer selected by dylanrafael05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
7 participants