Category "c++sharp"

How can I get the value of inheritance class of other inheritance class in .NET Roslyn API?

Good day, I've been trying to get the value of inheritance class name of other inheritance class in Roslyn API. like below picture, when I'm scanning the 'Face

Swagger UI Web Api documentation Present enums as strings?

Is there a way to display all enums as their string value in swagger instead of their int value? I want to be able to submit POST actions and put enums accord

How to send an outlook mailitem using specific email address?

Hi does anyone know how to send or reply to an outlook mailitem using a specific string of email address? FOR EXAMPLE: my outlook email address is: string em

C# how to convert system.windows.media.brush to system.drawing.brush

I am trying to add a watermark for a TextBox. The TextBox.Background is a System.Windows.Media.Brush. I need the Graphics.FillRectangle(System.Drawing.Brush....

How to unsubscribe from an event inside of the gamemanager?

In my GameManager script I have a delegate. In my Door script, I subscribe to this delegate. I've tried unsubscribing from it in both the OnDisable and OnDestro

Multithreading matrix multiplication in C#

I have a task - write multithreading matrix multiplication. Each vector product must be calculated in new thread.(If we have matrices n by m and m by k we must

c# update if record exists else insert new record

I have code that inserts data into a table when a user enters certain values into three boxes on the page. The boxes are order number, total weight and trackin

Select multiple columns using Entity Framework

Maybe an easy question, but can't find it easily so forgive me =) I try to select multiple columns. The statement I use is: var dataset2 = from recordset in en

cad image is not loading large files

I am trying to load a .dwg file to convert from cad to pdf using below code: using (var image = Aspose.CAD.Image.Load("fileName.dwg")) { // process the draw

Sorting a 1-to-many relationship for a log table for the most recent item

So I have a table, Equipments, that contains assets. There is a table connected to this one in a 1-many relationship that logs each time it is inventoried, by w

The type ApplicationUser cannot be used as type parameter 'TUser' in the generic type or method 'IdentityDbContext<TUser>'

Trying to implement Identity in ASP.NET Core 2.0. Having many problems getting my head around this. Startup.cs public class Startup { public Startup(ICon

How to remove the exe part of the command line

This is my code. The input command line is var1 val1 var2 val2: var rawCmd = Environment.CommandLine; // Environment.CommandLine adds the .exe info that I don'

How can I use a built Expression in an Include .Where() to apply an Include Filter when it expects Expression but only allows Func?

I'm getting some errors trying to build expression trees on nested collections. I have classes: // not DB entity public FilterTerm { public string Compariso

Protecting a file by a password [closed]

I have a C# application in which i'd like to create a file : string fileName = "test.txt"; // a sample file name // Delete the fi

Azure Functions - can't be invoked from Azure WebJobs SDK

So I've been trying to create a simple azure function, that would be an http trigger "CreateUser". I did an other http trigger to simplify what's wrong, it look

What unit tests would be better or redudant

I started to learn a new topic for me - unit testing. Ffter writing a few tests, I began to wonder what else can be written and whether it will not be redundant

Create XML attribute in c#

I have the following code to write some data in an xml file. It works well but the attributes. I can not create attributes and its value for an element. //.xml

How to create docker image for dotnet app?

I have a dotnet project that work when i do dotnet run, i am trying to containerize that dotnet project. For that i have create the Dockerfile as below: FROM mc

Pros/Cons Using multiple databases vs using single database

I need to design a windows application which represents multiple "customers" in SQL Server. Each customer has the same data model, but it's independent. what w

C# Traverse tree and find all unique hierarchy chains from root to leaf

I am working on a tree problem and not able to figure out how to solve the problem at hand. I've googled and also checked on SO, but could not find a suitable a