Category "c++sharp"

Proper way to use ViewBag for selectlist

I am getting an error on my selectlist when I open the form. Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: 'Cannot convert type 'System.Collections.Gen

How can I reduce the amount of files produced by dotnet publish command line? [closed]

I tried to publish my dotnet app using dotnet publish --output publish --configuration Release but the result not as expected because the last

How to get requested GraphQL fields in C#?

I'm working on a GraphQL -> SQL parser that includes some joins, so it makes a performance difference whether a certain field is requested. Is there a way to

How to get focused window handler

I have a WPF custom virtual keyboard application. I need to host this WPF application as standalone and user should be able to use this to enter values for any

NetworkStream.read taking 2 seconds to read data from stream (TCP C#)

I have a TCP request response model in C# where I am communicating with a server. Once the server has written data to the stream, I am reading that data. But st

Regex to recognise valid NuGet package filenames

Some NuGet packages have filenames that look valid but are not. Perhaps the versioning does not comply with semver or the name of the package confuses NuGet's p

HttpContext GetEndpoint on modified request path .net 5

I'm trying to create a middleware to handle country code in the url. The code i have works great for removing the country code, so it's routed to the correct en

EF Core group by date and count value for previous dates

I have a table like Date Balance A Balance B --------------------------------- 2022.03.01 100 200 2022.03.01 200 500 2022.03.02 300

Variable changes absurdly like 3 to 51? [duplicate]

I have been trying to solve a codewar question but when I use char to int .I get absurd results. like I enter 3 as base and 3 as power but res

Need Help in Rigidbody based FPS Controller in Unity

I am Learning unity and trying to create a fps game, but while making its controller i am facing a bit problem, like i want to move player ,, but using rigidbo

Unity with azure speech sdk

When i am using the azure speech sdk on unity, when i test it on the computer it works fine, i can speak, it recognizes and responds in speech all normal. When

c# StringExtension with Method Space

I try to create a string extension with the method Space(int) in it. If I have an instance of a string, then its no problem. But without I have no Idea. The cal

How to send form-encoded List<long> from SwaggerUI?

I'm getting 400 Bad Request on sending List<long> from SwaggerUI to .net application Swagger Response : {"statusCode":400,"message":["The value '"1","2",

C# Console-Application with no console but winforms

We have an application that is a WinForms-Application. It accepts startup parameters and can perform certain jobs with no UI by using the command line. Now, we

TrayIcon with WinUI 3

I am trying to make a program that runs in the background, and I want to place a Tray Icon in the Tray Icon Section of Windows. I didn't find a solution to do t

Why when i'm using Show method on another form the window form stuck and won't open

Where i'm opening the other form using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Data.SqlClient; us

TabControl overlays Minimize, Maximize and Close button of window

If I create for example 12 Tabs at start of my app the tabpages are overlapping the Close, Minimize and Maximize buttons, I have used the official sample from M

Validate with Bouncy Castle ECDsaSigner

I am trying validate the message digest hash using eCDsaSigner with R and S but VerifySignature returns false . Is it possible to get more information as to why

Why is my script for a sprite applying to a tilemap? (Unity2D)

I'm trying to make a simple top-down 2d movement demo as a personal project, and I've run into a very weird roadblock. I was using code from this website to mov

Win SSPI Negotiate auth when running a service and client both locally

At my job I faced an issue while running a WebService locally and doing authentication into it also locally. WebService uses Waffle with SSPI through JNA and ex