Category "c++sharp"

Table 'tblCustomer' does not have the identity property. Cannot perform SET operation

Occurs when I try to set the identity_insert to ON in the SQL DATAMANAGEMENT STUDIO. The worst is I do not know why should I deal with this value, and I am not

Changing the parameter name Web Api model binding

I'm using Web API model binding to parse query parameters from a URL. For example, here is a model class: public class QueryParameters { [Required] pub

How to validate/sanitize an int so Checkmarx notices I validated/sanitized it

I have some code that retrieves numeric data from a source Checkmarx considers untrusted (a file under my control), which at some point I convert to a pair of i

Make NUnit fail on invalid test parameters

Say that we have the following unit test: [Test] public void OneAndOneTest(int one) { Assert.That(1 + one, Is.EqualTo(2)); } The compiler will accept this

During thread contention how can I speed up this ConcurrentQueue implementation which uses ReaderWriterLockSlim over a regular Queue<T>

Question: How can I implement a faster thread safe queue to support an object pool when under heavy thread contention? Scenario: My overall final objective is a

Get all emails in inbox .Net.Mail C#

I'm making a small program that can send emails and read emails. I can currently send emails however I'm not sure how I can access my inbox using .Net.Mail. Is

HTML to Image - vertical text

I'm using library TheArtOfDev.HtmlRenderer to convert html to image and then send it to printer. The Html I need to convert contains vertical text and rounded

Delete All Azure Table Records

I have an Azure Storage Table and it has 3k+ records. What is the most efficient way to delete all the rows in the table?

FtpWebRequest.GetResponse() takes forever

I made a simple program download files from my FTP server and usually this works well(I often reboot my laptop if not working and the program runs perfectly) wi

Get all emails in inbox .Net.Mail C#

I'm making a small program that can send emails and read emails. I can currently send emails however I'm not sure how I can access my inbox using .Net.Mail. Is

Is it possible with Fixture to create a list of N objects?

I want to create with Fixture a list of N objects. I know I can do it with: List<Person> persons = new List<Person>(); for (int i = 0; i < num

No Colours in Specflow Feature Files on Visual Studio

I have the latest version of SpecFlow installed, and still the feature files display uncoloured, like so... (Not enough rep to insert images) Specflow uncolou

Include pdb files into my nuget (nupkg) files

I am using MSBuild to generate my nuget packages. Is there any command I need to set, to allow it to include my .pdb files, for stepping into the source while

Error in exporting fastreport to pdf on asp.net c#

I want to export .frx report that designed by FastReport as an pdf or excel file on a c# web form application like code below: public static bool ShowRepor

Create class and auto-initialize dependencies with FakeItEasy

Is it possible to create a class under test with FakeItEasy, where all dependencies that are declared in the constructor are initialized automatically with fake

Is it possible to inject a specific configuration class bound as a suboption and not to IConfiguration<MyType>?

I have a class that I want injected into some controllers. It has a few dependencies that I want to be automatically injected. Specifically this class requires

How to set ASPNETCORE_ENVIRONMENT to be considered for publishing an ASP.NET Core application

When I publish my ASP.NET Core web application to my local file system, it always takes the production-config and the ASPNETCORE_ENVIRONMENT variable with the v

Google Calendar V3 hangs when used outside local environment

I'm working on a wrapper for the .net version of the Google Calendar API. The authentication is rather simple and working fine locally (localhost:port). UserC

HangFire dashboard not displaying in PROD

I am using HangFire to schedule jobs but when I deployed to PROD, the website/hangfire url is not working. I am getting The system cannot find the file specifie

C# UWP Geolocation, access denied

everybody. I am trying to get current user's location in C# UWP application. var geoLocator = new Geolocator(); geoLocator.DesiredAccuracy = PositionAccuracy.