Category "c++sharp"

Best way to use multiple awaits C# .NET Blazor

In a Blazor app I have a file uploader that can take multiple files. When the user clicked 'upload' I used something like this: private async Task HandleFileUpl

Is it possible for String.split() to return tuple?

I have string which I need to split() and assign it's value into two variables. Is it possible for split() to return tuple instead of string[] so I can do somet

Cast IQueryable<DomainModel> to IQueryable<EntityModel> for EntityFramework

I'm trying to convert an IQueryable to IQueryable to allow me to take advantage of the dynamic filtering offered by Linq in the EntityFramework context. I'm try

EditorConfig control File-scoped namespace declaration

I'm using C# 10 new feature File-scoped namespace declaration. I have old code like this namespace SampleCode { public class MyClass { } } I'm movi

.NET ShareFileItem properties null for Azure File Share

I am trying to create an azure function that'll clear down files older than a certain age, but when I access the properties of the file they are all null, what

Setting "Assembly neutral Language" destroys GUI

I have a C#-Desktop-app with some GUI that look likes this in the Designer: The Property "Localizable" ist set to True and "Language" is "German". Right now th

How can I add Windows Credentials to Credentials Manager on Windows programmatically?

I have looked at this question's selected answer, Retrieve Credentials from Windows Credentials Store using C#, which uses the CredentialManagement NuGet packag

How can I create a Xamarin.Forms cards carousel?

How can I get this carousel of cards in Xamarin Forms? I did it in ASP.Net-MVC C# and I'm using a JS plugin and HTML and CSS. Now I need to do it using Xamarin

Identify USB flash drive in C#

I need an ID that uniquely identifies an USB flash drive. The ID should already exists on the flash drive, so that it is the same ID on every PC I plug it in. I

Why doesn't scaffolding work as expected?

I am trying to scaffold and I get the following error: There was an error running the selected code generator: 'No parameterless constructor defined for typ

Status code unknown Error at IndexDocument()

I want to inject a data set using C# and elastic + kibana version 8.x. On console at Kibana it works fine. The dataset is not saved at elastic and at the C# cod

ASP.NET 5 Authorize against two or more policies (OR-combined policy)

Is it possible to apply authorization against two or more policies? I am using ASP.NET 5, rc1. [Authorize(Policy = "Limited,Full")] public class FooBarControll

.net maui blazor - Show image from android internal storage

Im using the .net maui blazor to get the device to take a photo, then as its taken it, i wish to display it on the screen so the user can see what image they ha

Smart home report state SYNC new device | Requested entity was not found. [404]

I've implemented the HomeGraph API with the help of the package Google.Apis.HomeGraphService.v1 (1.50.0.2260) It seems to work fine as well, the ReportStateAndN

Calculate / Estimate the compressed file size without performing compression

I want to calculate / estimate what would be the file size of image (.jpg) after doing compression with Encoder.Quality value. Here I should not perform any com

How to get all DbSet from DbContext

I need to get all tables in the database using EF. I need them to go table by table and extract certain information from each. Any idea how?

CryptographicException in Classic ASP with MySQL TLS

I am facing this issue when I am trying to invoke a COM Visible c# class in classic ASP Page which tries to execute one MySQL query against database.(Here MySQL

How to set Microsoft.Azure.Devices.Client.DeviceClient KeepAliveInSeconds to a higher number than 30

I am investigating using MQTT (or AMQP) over a satellite connection. I am using MQTT over HTTPS towards an IoT Hub in Azure. Data is very expensive on satellite

Does Java have a similar post method diamond operator that C# has?

The Unity project makes frequent use of C# functions that supply a type in a diamond operator after the method name. In the Unity source code it's defined like

What is the difference between using and await using? And how can I decide which one to use?

I've noticed that in some case, Visual Studio recommends to do this await using var disposable = new Disposable(); // Do something Instead of this using var di