Category "c++sharp"

Arquivo make file para entrar em pastas [closed]

I have a MakeFile file in the following way: conf: cd teste nano teste However, when i execute make conf, he does not enter in the di

System.UnauthorizedAccessException in mscorlib.dll

I was developing an ASP.NET application. Then I did not test the application in the debugger of Visual Studio, but transferred it via File Deploy to another ser

How to set specific point to a node in MSAGL

I'm trying to draw some graph using the Microsoft's MSAGL. Here I have some nodes, but is there a way to set their position using Points? I need to place up to

Internet Explorer redirect on all .Net Core project pages

I'm a .Net Core beginner and look for a solution to protect the application from IE. I got the following code working in Controller: string userAgent = Reques

Connecting to a SQL Server 2012 database in Visual Studio 2008

I am currently developing a mobile application based on Windows CE for my team to track out assets and store them in our existing database. I am able to devel

Using 0 as Primary Key

I use lookup tables commonly and sometimes I have some default record in the Lookup table and I think for this record I can use 0 as Primary Key a as shown belo

Dynamic SQL Query in C#

I'm trying to create a query with a variable number of parameters, giving to the program the name of the table and an Array for the names of parameters and anot

SetForegroundWindow on macOS using C#

On Windows I can set a window to be in foreground using this code: [DllImport("User32.dll")] public static extern bool SetForegroundWindow(IntPtr hWnd); ... var

Visual studio 2022 how to auto complete only on tab?

Right now, visual studio 2022 will auto complete on a whole bunch of characters that I use in normal coding, such as ( and space.If i for example intend to crea

How do I compile a Spritefont file into an XNB file?

So I've very recently started trying to program a game with a friend of mine. I found some well made tutorials on FNA and I've been using that and everything's

C# EFCore.BulkExtensions The MERGE statement conflicted with the FOREIGN KEY constraint

Parent: public class Currency { [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public int Id { get; set; } public string? Name { get; set; }

Write to console while waiting for input

I am a beginner in programming and I need to write a c# console app that does something (let's suppose writes stars to console) in a loop until user inputs a co

Prevent C# "with expressions" bypassing constructor validation

I was disappointed to discover that C#'s "with expressions" allow the caller to bypass constructor validations on the record. Consider: record AscendingPair {

How do I perform row arithmetic in OpenCVSharp?

In c++ I can perform row arithmetic on a matrix: Mat pPrime = Mat::ones(Size(3, 3), CV_64F); pPrime.row(0) = pPrime.row(0) / pPrime.row(2); Is it possible t

use custom python module in script run from c#

I am trying to run a python script from a c# console application. This c# code works fine until I import our custom python module that in turn imports other mod

c# replace string with many "x" [duplicate]

I am writing a windows form app in C#. I have a label with a random word, e.g. "computer". User has to guess what is this word by guessing let

Unity3d - Trying to change color of Material via C#

I've looked all over for a solution for this and it seems simple enough but I don't understand why I can't change the property of one of the materials located o

Why is web.config getting created on publish not on build the project in Asp.Net Core API?

I have Asp.net Core 3.1 API project. When I build it doesn't create any web.config file, but when I publish the API using VS 2019 in a folder, it creates a web.

LINQ Expression GroupBy Select First

I've got a question on LINQ Expression. I need to replicate the following lambda: var result = processRevisions OrderByDescending(pr => pr.CreatedAt) G

Can't Install Nuget Package

I am trying to install System.Runtime.Handles so I can use SafeAccessTokenHandle and RunImpersonated, however when I try to install the package I get the error