Category "c++sharp"

How to enable zoom in and zoom out on a contentpage in xamarin forms?

How can I enable zoom on a contentpage in xamarin forms? Is it possible to enable it on the entire contentpage? Or is it only possible to zoom in on images?

ASP.NET Core MVC (2.2) Error Middle-ware not triggering error pages

In my ASP.NET Core MVC (2.2) app I have completed the setup for a global error handling class. I inject this class in the Startup.cs of my project by using app.

How to convert a file into byte array in memory?

Here is my code: public async Task<IActionResult> Index(ICollection<IFormFile> files) { foreach (var file in files) uploaddb(file);

Error adding migration when data models are in a separate assembly

I've just setup new projects, Pegasus (my main web application) and PegasusEntities (my database objects). My Pegasus start-up code includes the following. buil

GraphQL : Not Getting EF Related objects after implementing Types

For background, I am following the tutorial here: https://www.youtube.com/watch?v=HuN94qNwQmM . As the code is too long I am putting that in git https://github.

Unable to load System.Threading.Tasks.Extensions

I have a web project build on .net framework 4.5.1. We are trying to added PostgreSQL support for the project. Using Nuget, I have installed 4.0.4 npgsql to the

System.Text.Json: How do I specify a custom name for an enum value?

Using the System.Text.Json serializer capabilities in .NET Core, how can I specify a custom value for an enum value, similar to JsonPropertyName? For example:

Visual studio keeps on popping Save as dialog box whenever I try to create or change existing table in Microsoft SQLClient

I have been trying to get rid of this problem but seems like there's no solution to this, my visual studio keeps on popping save as dialog box whenever I try to

Is the `is` operator thread-safe/atomic in C#?

Is the following code thread-safe? public object DemoObject {get;set;} public void DemoMethod() { if (DemoObject is IDemoInterface demo) { dem

Outlook VSTO plugin stops executing while iterating over contacts in default contacts folder

I wrote an Outlook plugin in which a method searches for a contact's phone number by searching the default contact folder for contacts with a specified email ad

Visual Studio C# - How do I turn off autocomplete (not intellisense)?

So I didn't use to have this issue as much in older versions, and it even then it was easy to get used to, but i got VS 2019 recently and now when I write code

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