Category "c++sharp"

IBrowserFile FromIMageFileAsync incomplete image

I'm uploading images to my app and I'm using this code: public static async Task<string> GetThumbnailAndImage(InputFileChangeEventArgs e) {

Return JSON string in a normal way

From one method I'm getting string like that one: "{\n \"Name\": \"Next steps for pathway activities\",\n \"Options\": [\n {\n \"Name\": \"Show next s

Memory usage of concatenating strings using interpolated vs "+" operator

I see the benefit of using interpolated strings, in terms of readability: string myString = $"Hello { person.FirstName } { person.LastName }!" over a concate

How to render and preserve <br> tags as line breaks using @Html.TextAreaFor

I'm migrating an ASP Classic app to ASP.Net MVC 5. The legacy data contains <BR> tags in the text. In the old application (still in use) the tags are rend

How to wait for login cookie in C# Selenium WebDriver?

Im only been working with Java before but need to set up some tests in C#. In a login test I like to have a wait method waiting for the login cookie to be set.

Convert String To camelCase from TitleCase C#

I have a string that I converted to a TextInfo.ToTitleCase and removed the underscores and joined the string together. Now I need to change the first and only

C# WEB API CORS does not work

Fighting with CORS. I have a site that is making a simple XmlHttpRequest to a WEB API I built in C#. var xhr = new XMLHttpRequest(); xhr.open("GET","h

Post FromBody Always Null

I've got a new API that I'm building with ASP.NET Core, and I can't get any data POST'ed to an endpoint. Here's what the endpoint looks like: [HttpPost] [Ro

XDocument xmlns url attributes persist to child nodes

Based on this SO solution, adding the same namespace to your child node will prevent creating empty xmlns="" attributes. I'm not getting empty attributes, inste

email address not displaying correctly when importing .pst to mysql using c#

I am using the code below to export an outlook-mounted .pst file called working to a local MySQL database, for the most part the code works fine however some "S

Programmatically get the list of the ribbons using VSTO add-in

I have created a C# VSTO add-in with Visual Studio 2019 that receives commands from a socket connection and it can insert text, modify buttons only in my ribbon

RestSharp body always empty

I need to call a Post service with RestSharp var client = new RestClient(url); var request = new RestRequest(url,Method.POST); request.AddHeader("Content-t

WPF app with embedded WebView2 suddenly shuts down without any visible exception when opening Oookii save file dialog

I'm trying to use an embedded WebView2 control in my WPF application, and open an Ookii VistaSaveFileDialog in response to communication from the webview. Howev

Where is "SetPassword" or "ChangePassword" in SQLiteConnection class?

I'm just learning how to encrypt/decrypt SQLite database. I found a way to encrypt, as in this post SQLite with encryption/password protection This page's bes

How can Outlook addin detect when an account is removed

I get accounts from Outlook like below. Outlook.NameSpace ns = null; Outlook.Accounts accounts = null; Outlook.Account account = null; string

Why are all the methods in Assembly-CSharp.dll empty?

I have recently decompiled the GameAssembly.dll from Among Us using Il2CppDumper-v6.7.6 My problem is that while i have the file Assembly-CSharp.dll open with

Combine Json and file upload in a controller

I'm trying to send a form with Angular to a controller that contains json and a file. [HttpPost("Save", Name = "SaveReportRequest")] public ActionResult<Repo

visual studio is running, but localhost can't connect

I have vs 2015, and a asp.net mvc 5 website. It was running fine until a while back, but just today I noticed it stopped working. When I start debugging, visual

Adding new Excel file to SharePoint - irgnore ask for check-in

I am adding a new excel file to a SharePoint Library. The Library requires check-in or check-out. When closing the excel workbook, a dialog pops up in the backg

C# Discord Embed Emoji Scraping

So I have set up a program that the goal of which is to run through every possible ID and test that ID to see if there is a discord emoji URL associated with it