Displaying Class Data? #1415
-
Hello. I've just found this project and think it is fantastic. I have two questions though.
//Person.cs
public class Person{
public int id;
public Person(int id){
this.id = id;
}
} #load "person.cs"
Person person = new Person(5);
class User{
public int id;
public double money;
}
display(person);
display(new User{id = 0, money = 10});
I unfortunately was able to answer both of my questions immediately after making this post after doing more research even though I was blind for about 30 minutes, but can't delete this thread. Thanks in advance for any help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
Also, I think the
#load
part is about C# scripting and not part of jupyter and interactive which is what I originally thought: https://docs.microsoft.com/en-us/archive/msdn-magazine/2016/january/essential-net-csharp-scriptingSumbission#3
though so I was confused. It shows the data as I was expecting though. I was afraid for some reason thedisplay
command did not work the same for classes defined in files outside of the notebook.