Code Snippets C#

Short texts C# 🧑‍💻 Code snippets C# ✍️ Reading lists C# 👀

Unity Component that generates a circle section mesh with reasonable accuracy

using System; using System.Linq; using UnityEngine; public class MeshGenerator : MonoBehaviour { [SerializeField, Min(0f)] private float radius; [SerializeField, Range(0f, 360f)] private float angle; [SerializeField, Min(0)] private int fidelity; private Transform _transform; private MeshFilter _meshFilter; private Mesh _mesh; private void Awake() { _transform = GetComponent(); _meshFilter = GetComponent(); _mesh = new Mesh(); } private void Start() […]

Features in Orchard Core

using Microsoft.AspNetCore.Mvc; using OrchardCore.Modules; namespace OCModule.Controllers { public class CoreController : Controller { public IActionResult Index() { return View(); } } [Feature(“American”)] public class AmericanController : Controller { public IActionResult Index() { return View(); } } [Feature(“Canadian”)] public class CanadianController : Controller { public IActionResult Index() { return View(); } } } using System.Globalization; namespace […]

Features in Orchard Core

using Microsoft.AspNetCore.Mvc; using OrchardCore.Modules; namespace OCModule.Controllers { public class CoreController : Controller { public IActionResult Index() { return View(); } } [Feature(“American”)] public class AmericanController : Controller { public IActionResult Index() { return View(); } } [Feature(“Canadian”)] public class CanadianController : Controller { public IActionResult Index() { return View(); } } }

Features in Orchard Core

using Microsoft.AspNetCore.Mvc; using OrchardCore.Modules; namespace OCModule.Controllers { public class CoreController : Controller { public IActionResult Index() { return View(); } } [Feature(“American”)] public class AmericanController : Controller { public IActionResult Index() { return View(); } } [Feature(“Canadian”)] public class CanadianController : Controller { public IActionResult Index() { return View(); } } } using System.Globalization; namespace […]

Features in Orchard Core

using Microsoft.AspNetCore.Mvc; using OrchardCore.Modules; namespace OCModule.Controllers { public class CoreController : Controller { public IActionResult Index() { return View(); } } [Feature(“American”)] public class AmericanController : Controller { public IActionResult Index() { return View(); } } [Feature(“Canadian”)] public class CanadianController : Controller { public IActionResult Index() { return View(); } } } using System.Globalization; namespace […]