Kensei
Kensei
CC#
Created by Kensei on 6/27/2023 in #help
✅ rosetta error
Hi guys, i was just writing some crappy interpreter for fun and suddenly i get this error message, saying: "rosetta error: unexpectedly need to EmulateForward on a synchronous exception x86_rip=0x4572646736 arm_pc=0x4311881116 num_insts=3 inst_index=1 x86 instruction bytes: 0x5210756398796194133 0x5257824249051376781" For me, this seems to be some low level emulation error, likely because i'm using an Apple Silicon Mac, has anyone else encountered this before? Thx
4 replies
CC#
Created by Kensei on 5/31/2023 in #help
❔ ✅ JSON Serialization not working?
Can someone help me with this one, in the MS docs this seems to work just fine, what am i doing wrong..
using System;
using System.Collections.Generic;
using System.Text.Json;

namespace JSONSerialization
{
class Program
{
static void Main(string[] args)
{
Infos infos = new Infos("TestName", 9283943);

var options = new JsonSerializerOptions { WriteIndented = true };
string serializedContent = JsonSerializer.Serialize(infos, options);
Console.WriteLine(serializedContent);
}
}
class Infos
{
public string name = "";
public int id = 0;


public Infos(string name, int id)
{
this.name = name;
this.id = id;
}
}
}
using System;
using System.Collections.Generic;
using System.Text.Json;

namespace JSONSerialization
{
class Program
{
static void Main(string[] args)
{
Infos infos = new Infos("TestName", 9283943);

var options = new JsonSerializerOptions { WriteIndented = true };
string serializedContent = JsonSerializer.Serialize(infos, options);
Console.WriteLine(serializedContent);
}
}
class Infos
{
public string name = "";
public int id = 0;


public Infos(string name, int id)
{
this.name = name;
this.id = id;
}
}
}
22 replies
CC#
Created by Kensei on 10/20/2022 in #help
(Solved) Allow Unsafe Code - VS MacOS [Answered]
Hi! I can't seem to find the "Allow unsafe code" checkbox in VS on my mac, despite searching online...
8 replies