DΣX
DΣX
CC#
Created by Cracer on 10/21/2024 in #help
How do I go about making a project in c#?
assuming you know c# already, start looking into the mvvm pattern, then get familiar with WPF as a ui-framework (its tmk still the most stable one) When you want to work with another framework later on, it won't be hard to switch on the next project, as many also use xaml. when you educated yourself on these two, and feel ready to start any project, make yourself a little design for the frontend you want to have. (make an actual drawing with paint, visio, drawio or similar. just a scribble is good enough) and then just start building it. the rest will come along the way
13 replies
CC#
Created by nikicha2209 on 9/6/2024 in #help
Calls in .NET Maui
You are taking about user chat or automated communication between 2 or more app instances?
8 replies
CC#
Created by eid on 6/30/2024 in #help
✅ await in c#
hence the task is being awaited
47 replies
CC#
Created by eid on 6/30/2024 in #help
✅ await in c#
the await keyword, followed by anything which results in a task, will wait then for the completion of that task before continuing
47 replies
CC#
Created by Androzeta on 3/11/2024 in #help
Trying to learn how to use return variables, is this a good practice exercise?
in fact it also helps when adding strange if else blocks that are sometimes making the methods harder to understand so instead of
... FunctionName()
{
if (<condition>)
{
return <custom result>;
}
else
{
return <default result>;
}
}
... FunctionName()
{
if (<condition>)
{
return <custom result>;
}
else
{
return <default result>;
}
}
you can write
... FunctionName()
{
var result = <default result>;

if (<condition>)
{
result = <custom result>
}

return result;
}
... FunctionName()
{
var result = <default result>;

if (<condition>)
{
result = <custom result>
}

return result;
}
ps: i know these are simple cases and especially the first one can be written soooo much shorter. these are just meant to be an example
12 replies
CC#
Created by Androzeta on 3/11/2024 in #help
Trying to learn how to use return variables, is this a good practice exercise?
i try to keep my methods short. but when i have the need for a result, i call that variable 'result' in fact when i start writing a method it became a standard pattern to write this
... FunctionName()
{
var result = <default result>;

return result;
}
... FunctionName()
{
var result = <default result>;

return result;
}
and then just add modifications to result between the initialization and the return this way you will have a valid result no matter what
12 replies
CC#
Created by UnemployedNinja on 3/10/2024 in #help
Why does this require a cast?
ok just wanted to point out : null != true and null != false and true != false the nullable bools has exactly 3 possible values, and if you compare against one, the others are false. and if you compare against "not one" there are 2 positive results (just negated). whichever one it is
23 replies
CC#
Created by UnemployedNinja on 3/10/2024 in #help
Why does this require a cast?
i hate this bot. not telling me how to use it
23 replies
CC#
Created by UnemployedNinja on 3/10/2024 in #help
Why does this require a cast?
foreach (var v in new bool?[] { null, true, false }) { var check = v is true;
Console.WriteLine($"For v being {(v is null ? "null" : v.ToString())}, the statement 'v is not false' is {check}") ;
}
foreach (var v in new bool?[] { null, true, false }) { var check = v is true;
Console.WriteLine($"For v being {(v is null ? "null" : v.ToString())}, the statement 'v is not false' is {check}") ;
}
23 replies
CC#
Created by UnemployedNinja on 3/4/2024 in #help
Dynamically assign values to class instance properties / Indexing class instance properties
Which is then just checking the properties in the class and signing them by string name 😁
15 replies
CC#
Created by medicooey on 12/24/2023 in #help
Creating Process as User from a Windows Service
Unfortunately i do not have solid docs for either of these. I'm not so into admin stuff
11 replies
CC#
Created by medicooey on 12/24/2023 in #help
Creating Process as User from a Windows Service
Also i believe you can set up the scheduler to run as the currently logged user?!
11 replies
CC#
Created by medicooey on 12/24/2023 in #help
Creating Process as User from a Windows Service
There is some sort of stuff you can inject into the setup of a new user, which allows you to add some sort of service that can handle your logic, to be run in user space
11 replies
CC#
Created by AceChewy on 12/20/2023 in #help
Wpf
😄
63 replies
CC#
Created by AceChewy on 12/20/2023 in #help
Wpf
sounds great tbh
63 replies
CC#
Created by AceChewy on 12/20/2023 in #help
Wpf
even webassembly
63 replies