C#

C

C#

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

Join

Jittery up and down transformation in unity

Hey, just wondering if anyone can help, im struggling with a jittery moving platform. im not sure if my code is the issue. Any help would be massively appreciated. ( the code works fine for side to side transformations but is jittery on up and down)
No description

How can i connect to Supabase Database with my .net Api

I couldn't find the answer if you could help me i will be appreciated that

Setting Machine Key in new .NET Core applications

I'm in the process of upgrading an old Umbraco site from version 8 -> 13. And I want to use a package called uSync.PeopleEdition to migrate over my users from the old site to the new. The docs (https://docs.jumoo.co.uk/usync/complete/guides/People_Edition/people/) tells me: *Syncing Passwords...

✅ Center text prompt.

Hi guys! I have been trying to center a text prompt for a console app but I haven't figured out how to do it. I have tried various methods like SetCursorPosition and the Center method. But nothing seems to work. Here is the code I've been working with. https://pastebin.com/UsKeEY9R...

✅ What is the free alternative to jet brains resharper ?

What are the best extensions for development in c#, visual studio. #help

What is the simplest way to safely manage client backend calls and sensitive data in Razor Pages?

Hi all! I’m working on a simple practice document editor web app using Razor Pages for practice, where users can edit and save plaintext documents (my goal is to basically make a rudimentary clone of Google Docs). My application has three pages, starting with a login page. After logging in, users see a landing page with a list of document names. Clicking a name opens the editor, which has a textarea for input and a "Save" button, along with a modal to prompt saving if they attempt to leave without saving. Currently, I’m stuck on how best to structure the PageView/PageModel and associated JS script file for the PageView to handle these types of backend calls efficiently on the client JS. My goals are to: - Make a backend call to save changes, which I believe would require both the document ID and textarea content on the front end so the method knows which document is being saved....

ajax

Hello, I am working with a kendo grid asp.net and I am trying to work on this submit reject button on the grid, the header checkbox is supposed to select all and then you can de select or keep all if you want, same with reject, from there there is a 2 buttons in the bottom to submit or decline if we want to keep these rows and then get an email sent to people depending on which button we click. I cannot figure out how to get this to work though and have been stuck if anyone can help
No description

Hitting the button does nothing....

I am developing a program to watch for some servers to be up... I have a script grabbing the directories of the servers to add them to the config. I have a button setup to run the script. When i click the button it does nothing... What code do i need to share in order for you to help?

Unity doesn't recognize my slider after loading a new scene (Scene not done loading?) What to do?

Hi, i got this function that gets called when pressing the setting button in my menu. now it should put the slider value to the speed value that was saved before (with the same slider) but i get a NullReferenceException. If I activate it manually a bit later with a button it works just fine. What can I do? Thanks for your kind help!...
No description

Why does my cpup tanks when I am running this script ?

Hi I am fairly new to c# and I am trying to build a ML.NET part of a larger project, but my cpup tanks every time I call this script, have I done something obvious that could explain why ? Can someone please tell me why my cpup tanks?

✅ Issue with picture box in C# Project

I have a project I'm working on and one of the picture box's will change on a button press. The code I have is
picStatus.Image = Properties.Resources.checkedRedNew;
picStatus.Image = Properties.Resources.checkedRedNew;
Which provides an error "Resource does not contain defintion for checkedRedNew"...
No description

How to display api json data into a wpf page

So I am making a flight Booking app and I am using Amadeus Flight API right and I want the user to search for Flight using a Form but I get this odd error Exception: The JSON value could not be converted to System.Collections.Generic.List'1[FakeFlightBookingApp.Model.FlightOffer].Path: $ | LineNumber: 0 | BystePostionLine:1. but it does seem to make the call to the API just fine and the data is displayed in the console log as you can see in the pic. I will give some of my relevant code
No description

Winforms control not updating on window resize

Hiya, theres an interesting thing that happens with my winforms application, im setting positions with code as its the aproach i know best but have encountered a weird issue where the position will not visually update, even after calling invalidate and update

Problem with datagridview sorting

after i use dataGridView1.Sort(dataGridView1.Columns[0], System.ComponentModel.ListSortDirection.Ascending); The datagridview starts ordering whatever i enter automatically. I thought this was supposed to sort the data only when i ran the command, not make it sort automatically all the time how do i sort a datagridview only once without the automatic ordering...

'FOREIGN KEY constraint failed in Sqlite using Entity Framework Core and WinUi 3

I am getting the following error when attempting to add to add a record to my SQLite database: SqliteException: SQLite Error 19: 'FOREIGN KEY constraint failed' The exception occurs in ClientViewModel.cs - line 74 Link to my project:...

New to Websites, starting advice? Also, how to get my website to use a domain name instead of my ip?

Hey I'm been working on a bot that integrates with OBS, Twitch, Discord and Spotify, all my own code is in C# but I need a way for people to configure and connect to it? I've created a MongoDB to handle each streamers info but I need a website for them to be able to login and setup the bot. I've got 1 domain that has an A record to my public IP and a 2nd domain that is forwarded to that 1st domain. I made a project using the Rider "ASP.Net Core Web App" template, with the "Web App (Razor Pages)" type. Without editing it at all, my website hosts and the Domain name works but once it directs to my PC, the URL at the top has my IP and not the domain name... Also is getting HTTPS to work easy enough or complicated?...

Godot UDP Client not functioning properly

I am making a Godot project where I have made a basic fighting game which will take inputs from a raspberry pi pico controller i have made which is a UDP server which sends data packets to the UDP client on Godot based on button presses for it then to be interpreted into actions in the game. one of my objects is stuck as null and i cant seem to fix it along with a whole other issue with the packet detection running every frame

NetMQ: SendFrame never sends, never returns.

(I'm posting this here because I haven't found a ZeroMQ community. If you're aware of one, I'd appreciate a link.) (I have marked the question Beginner within the context of ZeroMQ; the problem really has little to do with C# or .Net.) I'm attempting to upgrade a .Net Framework 4.0 project to .Net Core. (The previous, working version of the project uses clrzmq.) So far I've managed to get it all working properly except the ZeroMQ aspect. ...