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.
1,620,060
questions
0
votes
0
answers
2
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 ...
0
votes
0
answers
11
views
Get all keys in a dictionary
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)...
0
votes
0
answers
7
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 ...
0
votes
0
answers
18
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>...
0
votes
0
answers
10
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 ...
0
votes
0
answers
10
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 ...
0
votes
0
answers
17
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 ...
0
votes
2
answers
25
views
Is there a generic way to use SetReturnsDefault in Moq
I have a data access interface looking roughly like this:
public interface IDataRepository
{
DatabaseResult<Customer> GetAllCustomers();
DatabaseResult<Report> GetAllReports();
...
0
votes
0
answers
14
views
Ghostscript Log Creation
I have an application where I am using ghostscript to convert image to pdf. I am using dll of ghostscript and using it in a .Net web api. And ghostscript software is also installed in the server, ...
-1
votes
1
answer
16
views
How to change DataGrid Cell background color in WinUi 3
How to change DataGrid cell background color in WinUi 3 based on binding value?
-3
votes
0
answers
13
views
Convert a html data or string to XSLT and then to pdf or is there any other way to do in C# [closed]
Can someone help me to figure out how we can convert a html data or string to XSLT and then convert to pdf or is there any other way to do in C#.I need to map the values we have in html to pdf. Please ...
0
votes
0
answers
17
views
How to draw a node in some given coordinates
Can`t draw node with specified coordinates on gViewer.
Try to use code from this question Change Node position in MSAGL , but it doesn`t work.
Form form = new ();
GViewer viewer = new (...
1
vote
0
answers
28
views
How to make a redirect after Login into Account
I use JWT token, send a request to receive a token, receive a token, how can I make a redirection in a convenient form after successfully completing the authentication procedure? I tried to do this ...
0
votes
0
answers
10
views
Connecting Client and Host grave issues in unity multiplayer game
Where do I even begin with this one. I'm currently making a multiplayer game on unity, using Netcode for Gameobjects. I've made sure to check the online functionality after each addition to ensure it ...
0
votes
0
answers
13
views
What is the Mapperly equivalent of AfterMap method in Automapper?
I'm trying to replace AutoMapper with Mapperly in our project due to the latter's performance. However, I'm facing difficulty while replacing AutoMapper with Mapperly because I can't find any ...