CachedWorld.cs 499 B

12345678910111213141516
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. namespace PlatformBenchmarks
  5. {
  6. public class CachedWorld
  7. {
  8. public int Id { get; set; }
  9. public int RandomNumber { get; set; }
  10. public static implicit operator World(CachedWorld world) => new World { Id = world.Id, RandomNumber = world.RandomNumber };
  11. public static implicit operator CachedWorld(World world) => new CachedWorld { Id = world.Id, RandomNumber = world.RandomNumber };
  12. }
  13. }