Category "c++sharp"

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

Unable to create a controller when using asp.net MVC 4/Entity Framework.

I am new to asp.net, and I am now facing a problem. I have created a project using asp.net mvc4, and I have added an entity data model and successfully connect

Check if WPF window is open

How can I check wheher a window is open or not. Is it possible? For example: if (window.IsOpen) { // window is open } else { // window is not open }

How can I get the account associated to a meeting request?

I need to know the account email address a meeting request is associated to (the email address the meeting request is sent to): string GetAssociatedAccountEma

Fluent validation divide bussines validation from auth validaton

I'm using ASP, CQRS + MediatR and fluent validation. I want to implement user role validation, but I don't want to mix it with business logic validation. Do you

Audio not playing in Unity

I am trying to program a script that when you hit an enemy it plays a sound, problem is I can't get it to play the sound it sees the audio source but my script

OutOfMemoryException while saving/creating/exporting excel sheet

Develop environment : OS - Windows 7 64bit CPU - i5 460M RAM - 8GB .NET framework - 4.0 Excel-Interop - Microsoft Excel 14.0 Object Library

How to fix "This page can't be displayed" error in ASP.NET?

I was debugging a localhost asp.net and I have made some very minor code changes and ran it again and now I get an error I have never gotten before. In nice bi

How to avoid color changes when button is disabled?

We have a Windows Forms project with quite a few FlatStyle buttons. When we disable the buttons, the colors of the buttons are changed automatically Frown | :(

How to fix "This page can't be displayed" error in ASP.NET?

I was debugging a localhost asp.net and I have made some very minor code changes and ran it again and now I get an error I have never gotten before. In nice bi

Setting Cursor.Position in Windows 10 not working

I want to set the mouse cursor to a certain position by using: Cursor.Position = new Point(Int32.Parse(X), Int32.Parse(Y)); This works normal

How can I convert text to Pascal case?

I have a variable name, say "WARD_VS_VITAL_SIGNS", and I want to convert it to Pascal case format: "WardVsVitalSigns" WARD_VS_VITAL_SIGNS -> WardVsVitalSign

Do Exchange emails always include SMTP addresses in the headers?

Here are the basic questions I have about Outlook add-in development: Are SMTP MIME headers available for all mail items? Even "internal" Exchange emails (Exch

How to place multiple spatial anchors and set up path finding in Unity for HoloLens?

I want to place multiple azure anchors and set up pathfinding (like destination point ). I followed the (https://docs.microsoft.com/en-us/azure/spatial-anchors/

notification does not implement $INotification C#

I have a multi-tenancy project using mediator and CQRS, for some reason my CRUD from order request are returning this error, I already try refactor my handler s

How to test database methods and get code coverage xUnit ASP.NET

I initially used the Moq library for testing, since I don't actually want to mess the data in my database. However, I quickly realized instead of running the co