Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [c#]

C# (pronounced "see sharp") is a high-level, statically typed, multi-paradigm programming language developed by Microsoft. C# code usually targets Microsoft's .NET ecosystem, which include .NET, .NET Framework, .NET MAUI, and Xamarin among others. Use this tag for questions about code written in C# or about C#'s formal specification.

c#
0 votes
0 answers
21 views

ASP.NET Core MVC: Comment Replies Not Working After Refactoring

I am working on an ASP.NET Core MVC project that involves posts and comments. Users can leave comments on posts, and they can also reply to other comments. The initial implementation was working (...
Hr.Panahi's user avatar
  • 832
-2 votes
0 answers
47 views

How can we update decimal precision for two places in c#? [closed]

I have a model class with a decimal? amount column. This has value from database is 35.00 but when passing from API It has 35.0. I'm trying to update decimal precision by two digit. something like 35....
Er Sachita Nand's user avatar
0 votes
0 answers
17 views

Multi-Collection Views - Display .NET MAUI CollectionView within a CollectionView

I am developing a c# .NET Maui application that creates a bowling app that maintains a recap of scores for bowling team. The requirements are that it is a general application that supports leagues ...
Shades49's user avatar
0 votes
0 answers
54 views

Passing an array of objects from C# to VBA Excel

I have a C# console application and Dll. I registered the dll as COM via interop. I used the COM Visible property, GUID etc Set Assembly Information, Build information to register it to COM I ...
Dee's user avatar
  • 1
0 votes
0 answers
6 views

Converting Word Document to PDF with Winnovative - Form Fields

I have a word document, that I want to convert to PDF via Winnovative. The basics work, as done with the following function. public byte[] ConvertWordToPdf(Stream fileStream) { var ...
MilConDoin's user avatar
0 votes
0 answers
17 views

Generic way of handling call to multiple api endpoints that use JWT

Setting up an application to call one of a handful of different client api endpoints, each of which use JWT. However, as of now I dont know the specifics of how the specific client might implement ...
bitshift's user avatar
  • 6,570
0 votes
0 answers
23 views

I created a c# Roslyn source generator and a test, the generator works but the test doesn't find the same source

I created a simple source generator that works fine using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Text; ...
Luiz Bicalho's user avatar
0 votes
0 answers
10 views

C# .Net Core Compile only one appsettings.json [duplicate]

In my application often I have three files of settings: appsettings.json appsettings.Development.json appsettings.Production.json When I publish, all three files are brought into the publish folder. ...
erikscandola's user avatar
  • 2,916
0 votes
0 answers
37 views

Access denied trying to execute c# console application

First up, I'll admit I'm a total noob at this. I'm just trying to learn, but it gets hard when I hit this kind of problem. Google hasn't provided any answers so I thought I'd ask here. I built my ...
RobG's user avatar
  • 596
-1 votes
1 answer
48 views

Get all keys in a dictionary [closed]

I have a collection of objects that contain a dictionary, and would like to extract only the keys and not the values in the dictionary (which are much larger than the keys, unlike in the example below)...
Vladimirs Kacs's user avatar
0 votes
0 answers
13 views

How to show debug logs while running blazor hybrid app on local android device?

I am using VS2022 Community Edition on Windows 10. I have followed this tutorial https://learn.microsoft.com/en-us/dotnet/maui/android/device/setup?view=net-maui-8.0 and have gotten my blazor hybrid ...
AgentX4000's user avatar
0 votes
0 answers
21 views

Differences between dotnet build -r and dotnet publish -r

With the following project file: <Project Sdk="Microsoft.NET.Sdk.Web"> <PropertyGroup> <TargetFramework>net8.0-windows</TargetFramework> </PropertyGroup>...
fharreau's user avatar
  • 2,275
0 votes
0 answers
13 views

Data resolution are not changing when try to minimize the resolution

In Firefox browser, when opened in normal form all data moves towards right, while it appears correctly in Chrome and Edge. Also when I tried to minimize the resolution in edge or chrome all data ...
Pam's user avatar
  • 15
0 votes
0 answers
12 views

.Net 8 Blazor Web App (server) -> Start with browser language and allow user to change language via dropdown

What I want to achieve I want my Blazor Web App (server rendering) to start with translations that fit to the browser language but also offer a language selection to the user to change the app ...
rekcul's user avatar
  • 329
0 votes
0 answers
25 views

How to securely store and retrieve sensitive data in a .NET Standard 2.0 cross-platform (Windows+Linux) library

I have .NET Framework 4.7.2 library to store and retrieve sensitive data (like tokens for our desktop apps communication) with help of CredentialManagement package on Windows. Now I need to make this ...
bairog's user avatar
  • 3,271

15 30 50 per page
1 2 3
4
5
7