Category "c++sharp"

List of objects to List of Lists in C#

I have a List of objects, say List<MyObject> = new List<MyObject>{object1, object2, ..., object10} Each object has property "Property1" which is a d

import google/protobuf/timestamp.proto was not found or had errors in windows

I am trying to generate C# code using .proto file, but getting error import google/protobuf/timestamp.proto was not found or had errors. windows syntax = "proto

How to insert properly into a many-to-many relationship?

When inserting data into a many-to-many relationship, should you insert to the join-table or to both original tables? My table models: public DbSet<User>

Find the coordinates returned by the server after send commands GPS Tracker (TK303 etc)

I sent commands to the server according to the following links and data was returned that I do not know how to find the coordinates. Link 1: GPS103 Tracker List

Empty Object when deserializing ViewPort object with ServiceStack

I'm having an issue since I migrated to the latest version of GoogleApi (by Vivet) After analyzing I have identified a problem with deserializing the ViewPort o

Storing numbers larger than Big integer C#

I am having a really hard time finding a way to store massive prime numbers in c#. I tried everything but nothing worked out for me. For example. How can I stor

Why is my UpdateFile getting a null in the response in google drive api v3 using c#?

I have an application that is written in C# so that it can be a stand-alone .exe with parameters passed in via cmd at runtime. I am trying to update a file in

How to get only one message from MQTT, when messages receiving in C#?

I developed simple IOT device using nodemcu module with 03 sensors. When device is connected, device sent sensor's data to mqtt broker as well. After I getting

Is there property to search in a value list in janus gridex by Containes text

I am bindind a combo in janus gridex with value list. combo binding successfully. But i face a problem when i am searching from this combo. it always search wit

How to rename key value pair within a nested json structure in C#

Hello everyone and thanks for helping me in advance. The following question might sound silly but I'm a beginner about it. Let's start! I have the following jso

ASP.NET Core : how to restrict applying custom attribute on condition during compile time?

Here is the sample code: public sealed class CustomAttribute1 : Attribute {} public sealed class CustomAttribute2 : Attribute {} [CustomAttribute1] [CustomAtt

C#: Simple state machine, how to get state from database and assing it?

I am wondering how to assign a loaded state from a database to a state machine. Simple example IState interface: public interface IState { void Process(MyCl

How do you get paths of copied files from clipboard?

I need to retrieve paths of files and folders currently copied into the clipboard, is this possible in C#? So let's say I do Ctrl + C a folder. That folder will

Difference between debug and release builds in Maui ios

I'm using Maui preview (now release candidate) with a blazorwebview, to build a fairly simple app which connects to a webservice and synchronises data. The wind

IdentityServer4 GetProfileDataAsync is not called for Identity Token, only Access Token

Using IdentityServer 4 (4.1.2), I've added a class implementing the IProfileService interface. The method GetProfileDataAsync is supposed to be called several t

WPF : How to bind a string to Dynamic resource for a label content

I am new to WPf and MVVM. I have Dynamic language change functionality in my wpf application. For this functionality I have 2 Resource dictionary for each langu

What is the easiest way to test multiple versions of a NuGet?

I have two C# projects. Project A is a NuGet package. Project B is a web service. Project A calls the web service. We want B (the web serice) to remain backward

Get Identity Role id - ASP.NET Core MVC

I am new to ASP.NET Core MVC, and I'm trying to develop a popup modal for Edit and Create. The create popup works, but when it comes to edit I can't get the id

C# variables of class are zeroed after P/Invoke call

I'm writing some vulkan code and ran into a problem which I can't get my head around. I've the following code: NativeMethods.cs: [DllImport("libvulkan.1.dylib",

Update to .NET Core 6.0 in JetBrains Rider

A teammate recently updated our code base to use .NET Core 6.0 and I'm trying to build the project in JetBrains Rider. I went to File > Preferences > Envi