❔ Getter on code dom

Hey, I am looking to have something like get => uwu["x"]; on the last line. Is there a way to do thaht ?
var x = new CodeMemberField(typeof(Dictionary<string, Dictionary<string, string>>), "uwu");
x.InitExpression = new CodeObjectCreateExpression(typeof(Dictionary<string, Dictionary<string, string>>));
class1.Members.Add(x);

var f = new CodeMemberProperty();
f.Name = "fr";
f.GetStatements.Add(new CodeMethodReturnStatement(new CodePrimitiveExpression(x.Name)));
var x = new CodeMemberField(typeof(Dictionary<string, Dictionary<string, string>>), "uwu");
x.InitExpression = new CodeObjectCreateExpression(typeof(Dictionary<string, Dictionary<string, string>>));
class1.Members.Add(x);

var f = new CodeMemberProperty();
f.Name = "fr";
f.GetStatements.Add(new CodeMethodReturnStatement(new CodePrimitiveExpression(x.Name)));
2 Replies
로크소르 - RoxxorXx
anyone ?
Accord
Accord2y ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server