Category "c++sharp"

Convert image byte array to PDF

I'm looking to convert an Image (PNG, JPEG, GIF), in the form of a byte[] to a PDF. I'm currently using this function, which works, but cuts off the bottom of i

DotNetCore 1.0 MVC how to automatically redirect to a single domain in live

I have multiple domains for a website: http://example.com http://www.example.com http://www.example.co.uk In production, I want the primary domain to be htt

Converting C# into Powershell with DllImport involved

I've recently been working on a little side project to see if I can get a little memory editing to work with PowerShell. I put together a small script in C# tha

C# Service HttpClient reponse null

I have gone through all the possible posts and I have not found any solution that works for me (There is no more to see the mess in imports), please help. :( I

How does GameRanger works?

I want to know how does GameRanger make players appear in the Multiplayer's LAN section of the games. Because in my observations there is no signs of Virtual Ne

Can't create an inference session in onnxruntime

I am not able to create an instance of InferenceSession using onnxruntime. My platform is Mac OS(Big Sur). The code doesn't even throw any exceptions. Process i

How to change value of XML Node with Self closing Tag using C#

I have an XML file, which is being loaded into an XmlDocument object in my code. It contains some nodes which have self closing tags. How do I access and change

How to change game object Material in Unity?

How can I do if cube1 collision cube2, cube1 material = yesil ? I'm new in Unity and English speaking sorry about that :)

Getting Label's Text From Static Method

I'm trying to take label1.Text how can i do it from static method (Windows Form) public static IntPtr hookProc(int code, IntPtr wParam, IntPtr lParam) {

How to apply Client Side validation using Fluent Validation for .Net core

.Net Core 3.0 MVC view. Needs to apply - Client Side validation for below model. Tried as follow: Model:Person public class Person { public int Id {

ASP .NET CORE simple parameter validation

Is it possible to do some validation using attributes on simple parameters, like: [HttpGet("test/{type}")] public ActionResult GetSomeData([Range(0,2)]byte typ

Unity3D Player walking through and on the Stone

Hello guys my Player is walking on the Stone and through the Stone. The Player called Champ has a Box Collider and the Stone has a Mesh Collider. Also the Playe

"Command Failed" error on Open Document method on C#

I'm getting error like "Command Failed" on Microsoft.Office.Interop.Word Open Document method(on word.Documents.Open code line) when sending much more parameter

.Net MAUI - AppShell navigation & dependency injection

I'm playing around with .Net Maui, AppShell and dependency injection. I try to call a page with a constructor which takes the ViewModel of this page as paramete

No Sufficient Data Content of User When Calling Microsoft.Graph Compared to Microsoft.Azure.ActiveDirectory.GraphClient

I want to change my code from Microsoft.Azure.ActiveDirectory.GraphClient to Microsoft.Graph on the same registered App. On some data structure(e.g. Group, Comp

The property 'PropertyName' could not be mapped, because it is of type 'List<decimal>'

I got this problem when I try to create the database with EntityFramework Core: The property 'Rating.RatingScores' could not be mapped, because it is of typ

Microsoft.Extensions.Hosting.HostFactoryResolver+HostingListener+StopTheHostException

I'm using Asp.Net Core Web Api 6 I'm facing an error when migrating my DbContext and when updating the database The Error [17:07:29 INF] Application Is Starting

Shake an object back and forth with easing at the end?

I almost want a jarring animation, such that it shakes back and forth rapidly for a second, and then slows back down, easing back into its normal position. Ther

Color RGB in BackColor's Form

I'd like to put the RBG color In the property of the form, not like code, but when I try I got this error. "0, 161, 230 no es un valor válido para Int32

In the CodePen markdown editor, can I set a C# Code Block?

When writing a post in CodePen, I can set a code block with JavaScript, this way: javascript console.log ("Hello, World"); How can I set the code for C#? I