Category "c++sharp"

How to enable the "Compress Shared Files" options in c# while zip the files?

I am trying to zip all the files in one directory in C#. However, one file is used by another process and causing an exception like, "(that) file is in use by a

DirectX 11 render BGRA32 Frame

First time trying to render something and I have big troubles... I am using DirectN library and SwapChainSurface class from KlearTouch.MediaPlayer. I am trying

Trouble passing a C# string from userland to kernelmode C and using it to find specific LDR_DATA_TABLE_ENTRY

I am having difficulty comparing a string passed from usermode type LPWSTR to a LDR table entry type UNICODE_STRING Kernel C: struct { int pid; int user

Pick a section of an image in c#

I have an image with multiple portraits inside, how can I pick each one of them without cutting the image in photoshop or something like that. The image would b

c# sending messages to local syslog service on linux

Is there a way to send log messages to the local syslog service on centos 7 within a c# program? In python there is the syslog library but with c# the only way

How can i start the same process two times, but only with one uac?

Following problem: I want to start the cmd as administrator in C# with a process to get the UAC befor the code: var process = new Process(); var ps= new Process

Can we invoke method outside the thread block by any technique in C#? so that we can use same thread method to invoke other methods as well.?

e.g. Here in this example, if I want to start thread on method M1 this way, Purpose is I need to call M2, M3 on same thread method to avoid repeated code. Is th

Databind Object to Winforms DatagridView with ComboBox

Currently I'm trying to databind object properties to a datagridview. The thing is that the datagridview should have a combobox column, where the user has to ch

'ZipArchiveEntry' does not contain the definition of 'ExtractToFile'

Using ASP.NET Framework 4.7.1, I am trying to compress a file but Visual Studio is showing that ZipArchiveEntry does not contain the definition of ExtractToFile

Get list of all possible Paths with a start node and many end nodes C#

I am working on finding/listing critical path and alternate paths of a road navigation data in a C# winforms app. This is the first time I work on a navigation

With ASP.NET Identity is it possible to add and delete claims dynamically during an existing session?

I'm trying to add and delete claims (roles in this case) dynamically after a successful login using Identity 2 in Asp.Net 4.5.2. My application has an authentic

Serialize response from post async .NET 6

I am trying to modify the response when serialized. TimeJoined is returned as a string in format hh:mm (GMT +_) and I want to modify as a 24h format, in the ins

How to exclusively set the value of a DataGridViewCheckBoxCell?

I have a List<Car> objects that have a bool property named Marked. I want to check / uncheck the Cell corresponding to this property, in a way that only o

grpc and polly - .net core 6

I'm trying to use Polly as retry policy handler for grpc in my .net core 6 project. I noticed that the retryFunc is never invoked. I started from this project g

Efficient queue clearing in C#

I'm currently dealing with a queue that has a couple thousand entries in it. To save on RAM usage I'm currently using the TrimExcess() method built in to the qu

How to write an asynchronous Policy handler, injecting a scoped service

I'm trying to write a custom policy for an ASP.NET Core 3.1 web application, using a custom Identity storage provider. I've tried to wrap my head around the fa

Entity framework core TPH query across different subtype properties

I'm using EF core TPH inheritance to model some data and I'm trying to write a query that will query across different subtypes. My current attempt at writing a

How to parsegju,jk

I have to parse a TSV file which has the following structure: [Secti "1 2" "2 3"his?

Autmapper map collections of different types to collection of another type with nesting

I am currently struggling with automapper.10.1.1 config. I have following types: class Response { List<Assignment> Assignments { get; } List<Pr

Best practicies global result - error handling in Asp.Net core 3 and Angular 9

According to Microsoft's recommendation, throwing and catching should not be used for the normal logic of the program. Minimize exceptions As part of a ASP.Net