Questions tagged as 'c#'

1
answer

Asynchronous module or handler completed while asynchronous operation was pending

I'm trying to send an email asynchronously, without having to wait for the return. But when I do not use await I get an exception on return to action . Code:publicTaskMissaoAvaliada(stringusuario,stringdestinatario){_email.From=new...
asked by 30.08.2017 / 02:58
2
answers

Create a new record based on another with Entity

I need to add some columns to a database as follows: I keep a line of bd in a variable Market novo = new market(); novo = context.Markets.where(blabla).First(); I change a column of the line novo.ParentID = 50; I'm trying t...
asked by 19.09.2017 / 15:07
1
answer

Conditional expression type can not be determined because there is no implicit conversion between "null" and "DateTime"

Follow the code below: string data_string = "17/01/2018"; DateTime? data = data_string == string.Empty ? null : Convert.ToDateTime(data_string); I get error:    Error CS0173 Conditional expression type can not be determined   because the...
asked by 17.01.2018 / 23:13
1
answer

How to replace string using another string containing Json?

Is there any way to do a replace of a String with the fields of another string that contains a Json? Example; I have the string; String template = "Olá [Nome], Tenha um bom dia ... hoje é [Data] e é seu aniversario"; And in the other...
asked by 18.01.2018 / 20:07
1
answer

What is the property of a COM + component "Remote Server Name"

I'm having a problem finding the COM + property name so I can change the content of it, by my searches I need to know the correct name of the parameter value so I can change it, in case it is Remote Server Name COMAdminCatalogCol...
asked by 22.01.2018 / 15:27
2
answers

The "Xamarin.Forms.Build.Tasks.GetTasksAbi" task was not loaded from the assembly

This is the error I'm catching:    C: \ my_path \ packages \ Xamarin.Forms.2.5.0.122203 \ build \ portable-win + net45 + wp80 + win81 + wpa81 \ Xamarin.Forms.Build.Tasks.dll.   Confirm that the statement is correct, if the assembly is   all i...
asked by 15.01.2018 / 21:52
1
answer

C # How to Select and Color all text within a given row in RichTextbox?

In C # I have a RichTextbox, inside it has several lines, what I want to do is to select all text within a given line and color. What I'm doing is this: richTextBox1.Select(0, richTextBox1.Lines[index].Length); richTextBox1.SelectionColor = Co...
asked by 06.01.2018 / 23:29
1
answer

Controller getting parameter array as null

I am making an AJAX request, but I can not pass array ... My controller looks like this: [Route("imoveis/BuscaDados/Json/Listas/ListaQuartos")] public JsonResult ListaQuartos(int idEstado, int idCidade, int[] idsBairros, int[] idStatus)...
asked by 16.01.2018 / 14:09
1
answer

How to change the color of several textbox by looking at only one condition

I'm creating an application in VS2015 WindowsFormAplication where I need to change the colors of the textbox when the result is greater than, equal to or less than zero (0). I'm working as follows: if (Convert.ToDecimal(tbEntrDiferen...
asked by 06.09.2017 / 18:41
3
answers

Finding pg_dump and pg_restore (PostgreSQL) on my computer with C #

To perform backup and restore to a PostgreSQL database using C # you need to find some files like pg_dump and pg_restore . How do I make a function to be able to find the files? or a kind of scan on the computer, to find PostgreS...
asked by 07.09.2017 / 01:12