Skip to content

Instantly share code, notes, and snippets.

View Guendeli's full-sized avatar

Guendeli Omar Guendeli

  • Ubisoft
  • Abu Dhabi - UAE
View GitHub Profile
using UnityEngine;
using System;
namespace GokUtil.UpdateManager
{
public class UpdateManager : MonoBehaviour
{
const int InitialSize = 16;
private int tail = 0;
@dtao
dtao / EvilStringHelper.cs
Created August 16, 2012 17:01
Devious C# class that makes .NET strings mutable without requiring the /unsafe compiler switch
public static class EvilStringHelper
{
private static readonly Action<string, int, char> _setChar;
private static readonly Action<string, int> _setLength;
static EvilStringHelper()
{
if (Environment.Version.Major < 4)
{
MethodInfo setCharMethod = typeof(string).GetMethod(