Category "c++sharp"

Opening/Closing a Database connection in an apsx page for an IVR system

I am currently developing an IVR system, my question is more on a development side of basic architecture and opening/closing a database connection. As you can

Using block galore?

I'd like your opinion on the following subject: Imagine we have a method that is responsible of achieving one specific purpose, but to do so, it needs the supp

Form within a foreach loop not posting the model back to the controller

I've searched around and can't find an answer to my problem. I've got a View that takes accepts Foo in like so: @model IEnumerable<MyApplication.Models.Foo

How can I obtain a vertical bar that fills, like a progress bar?

As the title says I'm trying to obtain a vertical a bar and fill it depending on values. I couldn't apply any answers I found. One answer suggested replacing Sy

xUnit shared context by private static fields

What disadvantages have an approach of sharing context by creating private static fields? If I don't need to call Dispose? public class MyTests3 : IDisposable {

Reset part of application settings

So, I have Form called Preferences with TabControl in it. This TabControl contains several TabPages(General, Advanced, Misc, ...) with few comboboxes, checkboxe

How to set json serializer settings in asp.net core 3?

json serializer settings for legacy asp.net core applications were set by adding AddMvc().AddJsonOptions(), but I don't use AddMvc() in asp.net core 3. So how c

onclick method not working in Blazor server-side razor component

I am building a sample razor component, and I can not get my button onclick method to fire. When I click the button nothing happens at all. I have even placed a

How to fire click event of the LinkButton in gridview and Show PopUp window in asp.net

I have tried to build one gridview with dynamic columns based the data source using the template fields in asp.net through code behind. For that, to implement

check if string exists in a file

I have the following piece of code which opens a text file and reads all the lines in the file and storing it into a string array. Which then checks if the st

C# OpenTelemetry against Jaeger works in Simple but not Batch

Have a pretty much working environment to use for tracing, OpenTelemetry against Jaeger Tracing. I sort of read that Batch for process is the preferred way then

Call a System.Action in a .NET dynamic method

I have a function that is building a dynamic method. As part of this dynamic method, it is calling an action known at generation time. As a minimal reproducible

Impossible to add a User-Defined-Data Type parameter to my query

I'm trying to use a User-Defined-Data Type with C# and SQL Server 2008 but I have an exception raised when command.ExecuteReader() is executed. string qyery

Swashbuckle - Add Model and Example values to Swagger UI from a Model from another project

I am using Swagger to document my .NET C# API and when my models are on another project Swagger just crashes and doesn't load anything. When I load the sample

How to do non-cached file writes in C# winform app

I'm trying to determine worst case disk speed, so I wrote the following function. static public decimal MBytesPerSec(string volume) { string filename = vo

Converting an int[] to byte[] in C#

I know how to do this the long way: by creating a byte array of the necessary size and using a for-loop to cast every element from the int array. I was wonde

How do I solve SecurityNegotiationException and InvalidCredentialException in WCF

So I've written a small game and wish for the game to be playable over the internet. I've been testing the game just through localhost using these configs: Cl

Performance Considerations of Microsoft Application Insights?

I couldn't find any information about an async implementation of application Insights, specifically the TelemetryClient for Microsoft.ApplicationInsights Nuget.

Does C# WinForms have a slider control?

Can someone guide me if C# WinForms has a slider control? I see WPF has it but it doesn't show up for me in WinForms what could be the problem?

What Salt size and position for AES 256?

I haven't written encryption in a while and have forgotten some stuff. I remember that to have the output be different for the same data using the same key, I w