Questions

How to use Xamarin forms' Button.ContentLayout property?

Using the latest pre-release, I noticed that the button now has a Button.ContentLayout property, which I am hoping will allow us to add custom views to buttons whilst retaining the rest of the buttons...

14 Nov at 11:50

Why people use CommandManager.InvalidateRequerySuggested() on ICommands?

I am making some custom ICommand implementation of my own and I see A LOT of implementations going like this: ``` public event EventHandler CanExecuteChanged { add { CommandManager.RequerySuggest...

14 Nov at 10:18

Getting the public properties of a class in .NET core

I notice that .NET core doesn't allow `myObj.GetType().GetProperties()` as no `GetProperties` method exists. Is there another way to obtain the properties of a class through reflection?

21 Jan at 07:47

Xamarin.Forms Binding Specified cast is not valid

I have a weird exception where the Compiler tells me that the Specified cast is not valid even though what im doing is very Simple. I have a ListView binded to a ObservableCollection. And inside my L...

13 Nov at 16:23

Fastest method to remove Empty rows and Columns From Excel Files using Interop

I have a lot of excel files that contains data and it contains empty rows and empty columns. like shown bellow [](https://i.stack.imgur.com/BirO8.png) I am trying to remove Empty rows and columns f...

C# - Servicestack MongoDB JSON Objects Unescape

I have got two problems. I have a local MongoDB with several collections. A DataBase Object looks like this: [](https://i.stack.imgur.com/sVKxI.png) My Configuration looks like this: ``` ​using F...

17 Nov at 17:35

Not able to use System.Management.dll in Dot Net Core

How should I gather Hardware Info if `System.Management.dll` is not compatible with . How do I get the Machine info like Processor Id, Disk Volume number etc.

12 Nov at 22:8

onClick event for Image in Unity

Is it possible add "onClick" function to an Image (a component of a canvas) in Unity ? ``` var obj = new GameObject(); Image NewImage = obj.AddComponent<Image>(); NewImage.sprite = Resources.Load<Spr...

7 Mar at 11:13

Does it possible to load multi nested objects in ServiceStack.OrmLite

I'm using `ServiceStack.OrmLite` as ORM in my project/ And I've faced with a problem. I've 4 tables in SQLite database: Person, Predmet (has PersonId foreign key and two fields references Dic table: D...

12 Nov at 19:30

Why reference types inside structs behave like value types?

I am a beginner to C# programming. I am now studying `strings`, `structs`, `value types` and `reference types`. As accepted answers in [here](https://stackoverflow.com/questions/636932/in-c-why-is-str...

23 May at 11:54

C# regex to remove non - printable characters, and control characters, in a text that has a mix of many different languages, unicode letters

i would appreciate your help on this, since i do not know which range of characters to use, or if there is a character class like [[:cntrl:]] that i have found in ruby? by means of non printable, i m...

12 Nov at 15:58

Should all Entity Framework methods use async?

Is it good practice, in Asp.Net MVC or Asp.Net Web API, to have every controller actions that query the database (even the simplest query) to use async/await pattern? I know using adds complexity, b...

Service Stack InvalidOperationException When Requesting /types/typescript

I'm using service stack to build an api on .Net Core and it all works well, but I would like to have access to the type links generated by the service, but when I request the type listing for typescri...

12 Nov at 06:48

Read an excel file on asp.net core 1.0

Hello I`m trying to upload and read an excel file on my asp.net project but all the documentation I find is for ASP MVC 5. My goal is to read the excel sheet and pass the values to an list of objects....

11 Nov at 23:43

Entity Framework Core count does not have optimal performance

I need to get the amount of records with a certain filter. Theoretically this instruction: ``` _dbContext.People.Count (w => w.Type == 1); ``` It should generate SQL like: ``` Select count (*) fr...

Generate javascript client from Servicestack api metadata/swagger

is there any way to auto-generate ServiceStack javascript (no typescript) client based on metadata/Swagger? It would be good to integrate that somehow with webpack. I am not sure is it possible to d...

26 Nov at 21:22

How do I implement a checkbox list in ASP.NET Core?

I am looking to implement a checkboxlist in ASP.NET Core, but am facing some difficulties. My ViewModel: ``` public class GroupIndexViewModel { public Filter[] Filters { get; set; } } public ...

15 May at 16:50

Re-evaluate all values in xaml page calculated by a markup-extension

In a xamarin app on a xaml page I am loading localized strings using a xaml extension (the details are described [here](https://developer.xamarin.com/guides/xamarin-forms/advanced/localization/)). For...

5 May at 13:38

In Unity, can I expose C# *Properties* in the Inspector Window?

Scripts are normally written so that public are exposed in the Inspector; is there some way to use instead? ``` // instead of this public GameObject wrongBall; // is there some way to do this (to ...

11 Jul at 19:8

ValidateInput(bool) in ASP.NET Core

In ASP.NET Framework when I want to pass HTML code from Javascript to Controller just wrote [ValidateInput(false)] before Method and no problem for me: Just like my question [here](https://stackover...

23 May at 12:0

Add message to azure storage queue without base64 encoding?

I don't have the possibility to encode my request to base64, and according to the documentation I shouldn't have to, but I can't figure it out. If I Base64 encode it's working fine: ``` <QueueMessage>...

9 Feb at 13:43

Syntax error versus compiler error in Visual Studio, or red wavy underline versus blue wavy underline

What is the difference between a "syntax error" and a "compiler error" as Visual Studio sees it? Or, put another way, why are some "compile-time" errors underlined with wavy lines and some with wav...

Response to preflight request doesn't pass access control check (Angular2)

I am getting below error on call to REST Web API in Asp.net. [http://localhost:54859/api/PostData](http://localhost:54859/api/PostData)[http://localhost:3000](http://localhost:3000) I am using Angul...

How can I deploy a C# console application as a single exe?

I have searched for this and there are a number of previous answers but all seem overly complex. I'm new to C# and Windows development in general (previous Mac developer). I have written a simple ...

11 Nov at 10:17

Testing Exception Messages with Shouldly

Is there a way to test the exception messages with shouldly? An example: ``` public class MyException: Exception{ } ``` The method to be tested: ``` public class ClassUnderTest { public void...

11 Nov at 09:23