Category "c++sharp"

There are more columns in the INSERT statement than values specified in the VALUES clause [closed]

I want to save new record in SQL table. one of this table field is "username" that I want to add record by using session and other fields are

How to set the form resolution for each screen in C#?

I made a project in C# Form with FormBorderStyle=FormBorderStyle.None Resolution = 1920 x 1080. But, this project is set for 1080p only and takes it offscreen a

Make string comparison case-insensitive for .net winforms application [duplicate]

Need to have string comparison case insensitive for .net winforms application. It is not a problem when strings are compared in my code, but I

.net Windows forms Property Grid

I have a .NET windows forms property grid which is tied to the collection of entities public class Entity { public string A { get; set; } public string B { get

SheetChange event is not getting changes of active excel cell when performing another function

I am coding simple application having one window form using c# in visual studio, app exe will be opened by excel VBA macro and the application will read the val

How to load an application to systemtray using Avalonia

How can I load an Avalonia application to the systemtray and set the menu items?

Formula to make the ends of the arms of a spiral galaxy less dense

I want to make a spiral galaxy in Unity 3D using C# ( i use a derived logarithmic spiral ). I want to set the end of the arms less dense than the middle, but mi

The Name DoEditButtonChecked does not exist in the current context C#

Very new to all this. Was working on my game in unity and got an error. I tried restarting unity, I tried asking for help in other places, and got no response.

Programmatically creating WPF/ASP.net CRUD UI from Database

I have a requirement to build forms directly from a specific dataset format. I've gone one step of being able to create the database from the dataset using F#.

How to do error handling with EasyNetQ / RabbitMQ

I'm using RabbitMQ in C# with the EasyNetQ library. I'm using a pub/sub pattern here. I still have a few issues that I hope anyone can help me with: When there

New line character from c# to cshtml

I am making a webpage... the controller is written in C# and the webpage is in cshtml. In the c# file, I am constructing strings to be put into the table on the

Force MVC CookieAuthentication to timeout prematurely, then setup combination of sliding and absolute expiration

I am maintaining a website that using cookie authentication in a ASP.NET MVC5 application. When the application went live the cookie time out is set to a very l

Grab object values during runtime for creating Mock objects required for writing Unit Test

Consider the below class which needs to be tested, class ToBeTested { Employee _e; public ToBeTested(Employee e) { _e = e; } void Process() {

Optional section was not defined error in nested layout pages

I have a _Layout.cshtml file that contains the following line. @RenderSection("Scripts", required: false) And then I have a StorageLayout.cshtml file that spec

Entity Migration. Could not drop constraint. See previous errors

Here is the code that produce this error. I've tried solution for renaming the AddForeignKey but the error is same. 'PK_dbo.Item' is not a constraint. Co

System.ObjectDisposedException: 'Instances cannot be resolved and nested lifetimes cannot be created from this LifetimeScope

I have an async controller and I am trying to call two different Async functions from it. like this public async void Approvefiles(string[] data) {

What's the VB.NET equivalent of async delegate in C#?

I'm trying to convert the following extension method (source) from C# to VB: public static Task ForEachAsync<T>(this IEnumerable<T> source,

WebView2 JS injection returns empty json string

With WebView2 for targeting Windows, I am trying to setup my own context menu. Either by selected text or by underlying element pointed by mouse click. However,

Can't get query parameter from HttpRequestData

I'm upgrading my code from .NET 3.0 to .NET 5.0, this changes the sintaxis quite a bit. In my previous code, which is a http request build in AZURE FUNCTIONS .N

send whatsapp messages using WhatsappAPI in c#

I have installed WhatsappAPI from NuGet package manager and tried to implement code but could not register my mobile number through WART (WhatsApp Registration