Category "c++sharp"

Create a StackLayout inside a Frame in Xamarin Forms using C# as background code

I use an <Frame> in my xaml page like this: <StackLayout> <Frame> <StackLayout> <Button></Button>

How can I configure Moq to return new instance per call?

I am trying to write a simple test with moq. When calling the mocked method for the second time, after changing the return value from the first call, the moq fr

Could not locate MSBuild instance to register with OmniSharp

I have found many questions about this but non have helped me. I am trying to write c# code and the omnisharp auto complete doesn't work and I get this back fro

EntityFramework in test initialization error: CREATE DATABASE statement not allowed within multi-statement transaction

I'm trying to build a quick test that deletes and recreates a database every time it runs. I have the following: [TestClass] public class PocoTest { priva

What does the => operator mean in a property?

I came across some code that said public int MaxHealth => Memory[Address].IsValid ? Memory[Address].Read<int>(Offs.Life.MaxHp) :

ClickOnce application working fine in IE and not in other browsers

ClickOnce application working fine in IE and not in other browsers as it's own they depends on some plug-in's. Can anybody give me suggestion or solution that

System.Net.WebException: Error: NameResolutionFailure when Calling WEBAPI in xamarin forms

I have created one simple xamarin form application using PCL, which is showing data in listview using WEBAPI. When i call WebAPI , i am getting below error. ex

WEBAPI not working when i add server ip address instead of name?

I have created WEBAPI application using VS2017 and deployed into IIS. After replace my server ip address instead of msweb102 like below URL, i am getting error.

How to ignore the format error flag in the cell number format

My code: columns = ws.get_Range("A:F", System.Type.Missing); columns.NumberFormat = "@"; After I debug the program, there is green color flag beside my number

Find the second maximum number in an array with the smallest complexity

Tried to googled it but with no luck. How can I find the second maximum number in an array with the smallest complexity? code OR idea will be much help. I can

JSON file as database

I'm tring to use a JSON file as database for static content in ASP.net (an image gallery). Everything works well: I can read the file and retrieve data and disp

Bold and Italics not working in excel with EPPLUS

I am using the below code for updating excel data format, here I want the heading to be in bold and entire data in italics format but when I run the code all th

show/ hide items in the listbox

I make a listbox and it works perfectly, I also made a search function, but I want to hide the items in the listbox and show them only when searched through ind

How to use SendInput to simulate the UP arrow key press (or other extended keys)

I am trying to programmatically simulate the pressing of the UP arrow key on the keyboard for an end-to-end test. With the below code, the GUI control receives

How to bind dynamic DataTable to DataList?

Code behind: DataTable dt = new DataTable(); dt.Columns.Add(new DataColumn("Rego No", typeof(string))); foreach (var item in list) { dt.Columns.Add(new Da

Testing web API service

I'd like to test the methods of a given Web API service. I could do this by adding a test project, instantiating the controllers and testing the methods. Howeve

Close the application before the form loads

I have a program wherein I will check if a file exists. If it does, the form will load. But if not, a messagebox will appear to inform the user, and then the ap

How to generate line coverage report with vstest.console.exe?

When I run vstest.console.exe with the parameters, vstest.console.exe App.Tests.dll /collect:"Code Coverage" /Logger:html /EnableCodeCoverage App.dll, it only g

Why use Page Factory?

I am a new test engineer and have been reading about Page Object Model and implementing them and keep coming across Page Factory. I understand that Page Factory

C# Problems getting a specific named MAPI property from a .msg

I'm having a similar problem to this question in getting a pair of "custom" MAPI properties from a MailItem in a C# console app, but with the extra twist that i