Category "c++sharp"

Retrieve C# Attribute Data With Extension Method

Looking for a way to retrieve attribute data for a property on a class (many different types) in my data layer with an extension method... Final goal is to see

C# access to stack object property

How can I access the objects property in this situation? Araba araba = new Araba(); araba.Renk = "mavi"; araba.fiyat = 12345; // I created this class and it wo

Is there any reason to keep array length -1 in iterations of a loop using arrays?

private static void SortArray(List<int> nums) { int buffer = 0; for(int i = 0; i < nums.Count - 1; i++) {

c# Cefsharp how to make correct sequence of JavaScript actions on the web site

These sequences of actions work with Thread.Sleep, somewhere in 1 second, somewhere in 2 seconds. I think using Thread.Sleep/Task.Delay is not good. Because it

How to make the graphics for a Graph theory undirected graph

I have been trying for the last few days to implement a graph into a C# Windows Forms app, but I have been unsuccessful at this task. I haven't been able to fin

I would like to change my Items Page from using CollectionView to ListView in xamarin.forms but I am having issues?

The above header refers. I would like to make this change so I can implement expanding lists (whereby my some of my list of items could have sub-items that can

I'm using a html.beginform to when i click in a button i go to a diferente Action, but i need to pass the values that i have inside my model aspnet c#

I'm developng a school project using a html.beginform to when i click in a button i go to a diferent Action, but i need to pass the values that i have inside my

C# convert Chinese date format to English date format

I use OCR technology and recognizing date from national id card of Taiwan. My issue is that this date format is different than normal as below example 52年

Unity Tetris Game blocks sometimes not colliding

I am creating a version of Tetris which uses pentominoes instead of tetrominoes (5 square blocks instead of 4 square blocks). Some of the blocks will sometimes

How to sovle Query Issue throwing MySql.Data.MySqlClient.MySqlException

I am doing a project with C# and I have this error: MySql.Data.MySqlClient.MySqlException (0x80004005): You have an error in your SQL syntax; check the manual

Xamarin System.ObjectDisposedException: 'Cannot access a closed Stream.'

I'm working on a mobile project with Xamarin Forms and I have this error in particulary case but, it's impossible to use the debuger to fix it. System.ObjectDis

WIX Installer: ensure successive Version numbers on build

I'm trying to automate my Wix installer builds with my Visual Studio Builds. I am grabbing the application's Application Version via this in my installer.wicpro

Difference between HttpContext.TraceIdentifier and Activity.Current.Id

I use a "trace id" in logs. Advice on the aspnet repo and here on SO is to get a traceid from HttpContext.TraceIdentifier. But when the framework creates a Prob

print multiple return from void to multiple textboxes in c#

i'm trying to build a question-solving module, so i want to randomly print the "correct answer" data i got from the database, i use a void to get the data, i wa

Does string.AsSpan() prevent string allocation?

I am building a custom JsonConverter, and i was wondering about the behavior of AsSpan(). public override int Read(ref Utf8JsonReader reader, Type type, JsonSer

RAR file downloaded with C# becoming corrupt [closed]

I'm download a .rar file from a github release but the downloaded file is becoming corrupt. The file is fine it's just not working when I down

Get Windows NT Login From Azure AD msal

I am working on API that is secured using Azure AD. Is there a way to get the Windows NT login from claims? Example. jDelaCruz

Create a site term column with graph API

I'm trying to add a new column to a site using MS Graph API. I followed the docs, which shows a Text column example, and that works. When I try to add a Term co

Could not load file or assembly 'NLog.Web.AspNetCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c'

I'm upgrading my solution from .NET 5 to .NET 6 and getting the error at runtime Unhandled exception. System.IO.FileNotFoundException: Could not load file or a

Xamarin.Forms: editing (in VS) custom control's property value at runtime in XAML doesn't cause any updates

I have a custom control in Xamarin.Forms app that's described via XAML. For example, CustomControl.xaml: <ContentView xmlns="http://xamarin.com/schemas/2014/