Category "c++sharp"

Avro ICallback is obsolete but what is the replacement?

Avro ICallback<T> is marked as obsolete: using System; namespace Avro.IO { /// <summary> /// Obsolete - This will be removed from the publi

Javascript: get a BadRequest error from a Web Api .Net 6 using fetch

I have a little trouble using fetch, This is javascript code: function loginJS() { const login = document.getElementById('login'); const nome = documen

Using SocketIO with Unity Quest 2 vr as client and Node.JS as server

Me and my team are building a VR game for the Quest 2 with Unity written in C#. We have a program that is the server that is written in JavaScript (Node.JS), th

How to implement offset based pagination for nested collection in HotChocolate GraphQL?

I've been trying to add Offset pagination for a collection inside an entity. I understood that I cannot use the [UseOffsetPaging] attribute directly. So I tried

Add Swagger description to minimal .NET6 APIs

I have a small project in .NET6 that contains minimal APIs like that one app.MapGet("/clients", async (IClientRepository repo) => { var r

Entity Framework. How to map class with nested Enumeration class

I am using an Enumeration class like this public class SizeUnit : Enumeration { public static SizeUnit Inch = new SizeUnit(1, nameof(Inch)); public static

.NET Maui: Vector/SVG splashscreen not correctly resized

Testing to add a custom splash screen for a Maui app, I read some Microsoft docs that says At build time, the splash screen image is resized to the correct si

intellij rider c# documentation english language

I just started with .net and Intellij Rider. I need to have spanish version of windows on my work laptop but I prefer to have everything related to code purely

Problems with user secrets in .Net console apps

I've created a .Net 6 console app. I added user secrets, but I only get the values defined in the appsettings.json file. I use Visual Studio Professional 2022 v

How do you create a component that allows the consumer to extend the interfaces for parameter inputs?

This may be a dumb question, but my search so far has come up short and I worry I might have too specific of a use case to find a clear answer anywhere else. I

How to register services with dependency container services by reflection in c#

I have an interface IProcessor and multiple processors implementing this interface: Processor1 : IProcessor Processor2 : IProcessor I want to inject these proc

Signalr Core WithAutomaticReconnect passing headers

I have gone through Signalr Core documenations and while I understand the feature .WithAutomaticReconnect() What I am curious is does it pass the headers still

Is there a way to Marshal a byte[] into a string without copying in C#?

I am in the process of building a sub-part of a native application, namely a Unity application that runs as a child of a different application written in a comp

How to silence Serilog in integration tests with the new minimal hosting model of .NET 6

I have a .NET 6 web API project with existing integration tests for some of the API endpoints. The project uses Serilog for logging and everything was fine so f

VS 2022 debugging: Sometimes works, sometimes get "breakpoint cannot currently be hit, no symbols loaded..."

I have a .Net web project that I publish and then attach VS to w3wp.exe for debugging. I place breakpoints, load the specific web page being modified, and debu

How to find string's left , right, middle side in C#

I want to divide my NameSurname variable to take name and surname seperately. How can I use left, right methods for this? public ActionResult SearchPerson(strin

problems running vssadmin from c#

I am executing the following code from C# Process process = new Process { StartInfo = new ProcessStartInfo("cmd.exe", "/c vssadmin resize sh

Change colour of date picker in Android with possibility to have custom Splash screen as well

I am working on a project where I would like to have custom splash screen, however I would also like to have dark styled Android dialogs, that are corresponding

How to host ASP.NET C# page using Word object in a server which do not have MS Office?

When I try to create an instance of a COM class, it throws this exception: Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)) I h

Microsoft.Office.Interop.Word in .NET 6.0 - Change builtin document property

Using the Microsoft.Office.Interop.Word.Document interface in C# you can get/set the document's built-in properties (Author, Title, Subject, Creation date,...)