lycian
lycian
CC#
Created by obason on 11/21/2024 in #help
Multiple Selection in WPF with MVVM architect
Instead of a selected item at the top level of the VM
3 replies
CC#
Created by obason on 11/21/2024 in #help
Multiple Selection in WPF with MVVM architect
The items in the list should have an IsSelected binding
3 replies
CC#
Created by Parker on 11/20/2024 in #help
How can I get format warning on the console?
10 replies
CC#
Created by Parker on 11/20/2024 in #help
How can I get format warning on the console?
10 replies
CC#
Created by Parker on 11/20/2024 in #help
How can I get format warning on the console?
https://github.com/dotnet/roslyn/issues/6195 gives some context on the history of this
10 replies
CC#
Created by HiveMind on 8/16/2024 in #help
Maui + Blazor hybrid app live coding
I can say with fair certainty you're going to have a bad time in VS Code, VS probably should work
8 replies
CC#
Created by HiveMind on 8/16/2024 in #help
Maui + Blazor hybrid app live coding
it also depends on if you're using VS or VS Code
8 replies
CC#
Created by LemonDwarfG59 on 8/15/2024 in #help
Need help learning C#
I really doubt that reading documentation is a good source for first time learners
The resource itself was a learning/training track. Those should be a good starting point (although agree that a book is probably a more complete way)
16 replies
CC#
Created by PizzaWizard on 8/15/2024 in #help
Understanding COM interface references for an ASP.NET REST API...
static is important there since it becomes shared. I'm assuming no need for complex DI etc
10 replies
CC#
Created by PizzaWizard on 8/15/2024 in #help
Understanding COM interface references for an ASP.NET REST API...
roughly that, although you'll probably want some locking/concurrency checks
10 replies
CC#
Created by PizzaWizard on 8/15/2024 in #help
Understanding COM interface references for an ASP.NET REST API...
static Dictionary<string, IRemoteControl> RemoteControlMapping = new();

[HttpPost("remote-control/create")]
public IActionResult CreateRemoteControl(string userToken)
{
if (RemoteControlMapping.TryGet(userToken, out var _))
{
// handle if it already exists?
}

RemoteControlMapping[userToken] = new RemoteControl();
return OK();
}
static Dictionary<string, IRemoteControl> RemoteControlMapping = new();

[HttpPost("remote-control/create")]
public IActionResult CreateRemoteControl(string userToken)
{
if (RemoteControlMapping.TryGet(userToken, out var _))
{
// handle if it already exists?
}

RemoteControlMapping[userToken] = new RemoteControl();
return OK();
}
10 replies
CC#
Created by PizzaWizard on 8/15/2024 in #help
Understanding COM interface references for an ASP.NET REST API...
As long as you new up a new RemoteControl for each UserToken then the references are unique.
10 replies
CC#
Created by PizzaWizard on 8/15/2024 in #help
Understanding COM interface references for an ASP.NET REST API...
Whenever I send subsequent calls over a different route to do something like start/stop/reset the simulation, I'm able to do so on the most recently-spawned application instance.
If the lifetime of the ASP.NET server is tied to the spawned application instances you could easily just keep a map of user:IRemoteControl if I'm understanding your scenario correctly
10 replies
CC#
Created by LemonDwarfG59 on 8/15/2024 in #help
Need help learning C#
Keep at it, and don't hesitate to ask questions. People in this discord are here to help. Good luck!
16 replies
CC#
Created by LemonDwarfG59 on 8/15/2024 in #help
Need help learning C#
all I can say is the first fully cool project I ever made was chess in java using notepad as my text editor 😅. Would not recommend
16 replies
CC#
Created by LemonDwarfG59 on 8/15/2024 in #help
Need help learning C#
Where did you learn C#? Was it just through documentation?
I learned C# after being in industry after about 5 years. So picking up core concepts was a bit easier for me. The core concepts I learned on my own eons ago + I have a CS degree.
16 replies
CC#
Created by LemonDwarfG59 on 8/15/2024 in #help
Need help learning C#
and if you have specific questions you can always ask here
16 replies
CC#
Created by LemonDwarfG59 on 8/15/2024 in #help
Need help learning C#
I'm not super familiar with the training courses, but I believe some of it is covered in https://learn.microsoft.com/en-us/training/modules/csharp-call-methods/3-call-methods where it outlines creating an instance of a type and calling methods. If you have feedback to improve learning there's a "Feedback" at the bottom that I would suggest you use 🙂 . Unfortunately it doesn't look like these are open source like most of ms docs are
16 replies
CC#
Created by LemonDwarfG59 on 8/15/2024 in #help
Need help learning C#
interfaces are not a unique concept to C# either, so if you find resources that help understand object oriented programming concepts you can apply that to C#
16 replies
CC#
Created by LemonDwarfG59 on 8/15/2024 in #help
Need help learning C#
The learning path itself I would say is not a perfect substitute for a class like structure. If you click on things like "interface" and go to https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/interface it should help you understand what an interface is. The same for class/record/struct. If you have specific questions about any of them this is a good place to post. I would say the "working with file system" section doesn't necessarily mean you need to understand what an interface is. Instead, you can follow along and use them without fully understanding. Sometimes knowledge like that comes easier with usage than an absolute definiton.
16 replies