This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using static System.Console; | |
using System; | |
public static class Constants | |
{ | |
private const double PI = 3.14; | |
public static double PI_1 = PI; | |
public static readonly double PI_2 = PI; | |
public static double PI_3 {get;} = PI; | |
public static double PI_4 = PI; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using static System.Console; | |
using System; | |
public class Constants | |
{ | |
public const double PI = 3.1415; | |
} | |
public static class Program | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using static System.Console; | |
public static class Program | |
{ | |
private static void Main() | |
{ | |
WriteLine($"π = {Constants.PI}"); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using static System.Console; | |
using System; | |
public class Constants | |
{ | |
public const double PI = Math.PI; | |
} | |
public static class Program | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WriteLine("Hello World!"); | |
WriteLine("Hello World!"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using static UnityEditor.Handles; | |
using static UnityEngine.Color; | |
using static UnityEngine.Gizmos; | |
[ExecuteAlways] | |
[RequireComponent(typeof(Renderer))] | |
public class MarkCenterAndExtents : MonoBehaviour | |
{ | |
private const float RADIUS = 0.02f; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"dependencies": { | |
"com.unity.2d.animation": "3.2.1", | |
"com.unity.2d.pixel-perfect": "2.0.4", | |
"com.unity.2d.sprite": "1.0.0", | |
"com.unity.2d.spriteshape": "3.0.10", | |
"com.unity.2d.tilemap": "1.0.0", | |
"com.unity.cinemachine": "2.5.0", | |
"com.unity.ide.rider": "1.1.4", | |
"com.unity.progrids": "3.0.3-preview.6", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using static UnityEditor.Handles; | |
using static UnityEngine.Color; | |
using static UnityEngine.Gizmos; | |
[ExecuteAlways] | |
[RequireComponent(typeof(Renderer))] | |
public class MarkCenterAndExtents : MonoBehaviour | |
{ | |
private const float RADIUS = 0.02f; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IL_0000: ldarg.0 | |
IL_0001: ldfld class BanksySan.Blog.Performance.Child BanksySan.Blog.Performance.Casting::_child | |
IL_0006: castclass BanksySan.Blog.Performance.Parent | |
IL_000b: ret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Casting | |
{ | |
private Child _child; | |
private Parent _parent; | |
[GlobalSetup] | |
public void GlobalSetup() | |
{ | |
_parent = new Parent(); |