Category "c++sharp"

Can't exit function properly

I have a C# unity function and I'm trying to request some json from a webserver but for some reason its not exiting the function where I want it to: using Syste

I keep getting the error `Central Directory corrupt` when trying to use ZipArchive

My code looks like below. public async Task<MetaDataItem> GetMetadata(Stream sm){ using (ZipArchive archive = new ZipArchive(sm, ZipArchiveMode.Read,

Encoding issue when saving files with javascript?

i've been trying all day to setup a function that creates a file from plaintext or a stream in a razor page. i create csv plaintext in a backend and send it to

How to remove events from stream between two other events in Nesper?

I try to remove Events between two distinct events. I've found a way to declare a dynamic context, which meets the situation in which I want to remove the event

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