C#

C

C#

We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.

Join

Avalonia Issue

Im having an issue in my wordle clone with when i type with the onscreen keyboard then press the enter key it types the same character that you pressed. Its been giving me quite a bit of trouble. I have a relay command named Press() and it calls the typecharacter function. Im thinking that it is the problem but i cant see anything. https://github.com/NoahWeddles/Wordle-Clone

How can I keep Azure prices down

Last week we had a new person join our team at work. His name is Jack. I asked Jack what the job market was like. He said it wasn't good. I also asked him what skills he believes are in demand. He said cloud. So, I've got to get experience at Azure, the cloud I know something about. However, I am not going to get much experience at using Azure, or any cloud for that matter, at work. I have experience at migrating small SQL Server databases to Azure SQL. I've created Resource Groups and have done some basic IAM. And I've created several Azure Key Vaults. But I don't have any experience at things like Azure Functions, Azure Logic Apps, using PaaS in Azure, etc. Things that a developer who works designing and implementing cloud solutions would know and do. I have always shied away from getting a cloud account because of the alarmist stories I've heard of developers signing up for an account with a public cloud provider one month, then the following month getting stuck with a bill that runs into the thousands of dollars. Of course, I could sign up for a simple Azure tutorial. I've done that, more than once, but they tend to be very narrow and once I'm done with the course, that's it as far as using Azure anymore goes. (At least, that's always been my understanding.) But now, given what Jack said, I think I've got to bite the bullet and get an Azure account. But I've GOT to keep it as cheap as possible. For those of you with experience at using your own Azure account, how do you keep the costs down? What advise can you give me, please?...

✅ .Net Digital Persona Integration Task

I have digital persona device that i want to setup. application is already built you just have to adjustments. Like settings buttons, layout and some fixes

Reading CSV file in C#

Hello guys, quick question. I need to read a csv file. Is there any recommended way of doing it or I just stick with the classic way of reading the file line by line and spliting them by the common delimiter? I read that their are in-built libraries for CSV, should I use them ?...

.NET Api Setup

Hello all, I just need advice in the setup of my .net project. I was making it using the typical Unit of work (Repository) architecture where you have a unit of work & services that call unit of work which has a bunch of classes that are repositories. ...

Clipboard.GetImage() handling webp.

Im trying to save copied image from clipboard to file, problem is if that image is .webp it is all black pixels. I tried pngencoder, using writablebitmap, skiasharp... I think the bitmapsource cant handle webp as Clipboard.GetImage() returns BItmapSource? Any ideas?

Need help with assignment

Hi, I’m working on a C# assignment for my course (Designing and Developing Object-Oriented Computer Programs) and I’m honestly a bit lost. I’m still very new to C# and programming in general, so I was hoping to get some guidance on how to approach it. Here’s what the assignment is about: Calories Tracker App...

how to verify me One Time Password? (i'm making login logic)

User needs to insert Name , Email and then One time password which will be sent on his Email . how to make this one time password verification logic? any ideas? (probably i will use this Email sender for many purposes , Email confirmation and etc.) thats what my sender looks like : ```cs internal class EmailSender : IEmailSender...

✅ namespace and using keyword in C#

Hello guys, I have a quick question. I don't understand, when do we use the using keyword and the namespace keyword... can they be used interchangeably ? (don't remember if I once saw a namespace along with a library name... is that even allowed?) . Now, the namespace, sometimes I saw something like that: namespace {...}like we have the curly braces but sometimes we don't. My IDE always do the heavy lifting but I wanted to understand what the syntax is :c. Do we use the keyword using when we need to use certain libraries? While the keyword namespace is used to related to certain folders/cs files? I'm a bit confused here :c... what about the namespace {...} syntax please...

✅ AUTOCLICKER

Trying to make an auto clicker when you hold down the left it doesn't work.. ```C# while (true) {...

✅ Access to the cloud file denied

The thing is my folder isn't synced to the cloud I'm not sure what's wrong with this
No description

✅ calling ShowDialog() with the OpenFolderDialog class creates an error

The error ```System.ArgumentException HResult=0x80070057 Message=Value does not fall within the expected range. Source=<Cannot evaluate the exception source>...

✅ JsonSerializer - properties have null values

Hello, For some reason the deserialization assigns null to every property, but the file is read, because there are exactly 3 entries in the list. No exception is thrown. ```c#...

✅ ASP.NET Core in Action, 3rd Edition by Andrew Lock still viable today?

Hello. I have experience with web development, particulary using NodeJS both backend and frontend; however, I want to learn about this aspect of programing using a different tool with ASP.NET. I'm currently learning C# with a normal C# textbook, then follow up to this textbook made by Andrew Lock for the web dev aspect of the language. The book covers .NET 7, so I was wondering if the contents of this book is still viable today or am I going to be wasting my time with this one?

Linking incremental generator to the consumer project

I have a problem where content generated by an IncrementalGenerator isn't available in the consumer project, no matter what I'm trying to do in both projects' files. Generator project: netstandard2.0 class library. Consumer project: net9.0 console app. Both projects are in the same solution....

✅ is there a Winforms API reference?

i have to build a winforms app as part of this school project i'm doing, and i'm opting not to use VS or the designer. i need an API reference and found this https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms?view=windowsdesktop-9.0 but I want to ask if everything i'm going to need for the UI stuff is under System.Windows.Forms or are there other namespaces I'd need to look at? right now i'm mainly interessted in the controls, layout managers, etc that I'd need to put together a basic, non-functioning UI...

✅ Connection razor and cs class

I'm trying to connect my razor using .NET MAUI Blazor so I'm trying to connect it to the cs class "Customer" so I can use the property there. I already used the @using "the namespace"
No description

In Unity: Enemy script not responding.

No idea if it´s something with the layers or on the code itself. The enemy doesn´t move. It can be pushed by the player but nothing else. When testing the next error message appears: NullReferenceException: Object reference not set to an instance of an object I can show the script is needed....

Help with understanding this logic question.

After 1 pm sonething went wrong with the mechanism of a certain clock and at 1.30 pm it struck 2 hours. Then went on striking every half an hour in the routine way indicating wrong hours. Find out when did it strike the correct hour next? (A) 12.30 am (B) 11 pm (C) 6.30 pm (D) Never...