Questions tagged as 'c#'

2
answers

Calling an asynchronous and synchronous method

I have a synchronous method, in it I call another method of another controller that would have to be executed asynchronously. I call this another method this way: Task.Run(() => _notificacaoController.NotificacaoIosTodos(titulo, c...
asked by 10.05.2017 / 16:43
2
answers

Check if there is a value in List

I'm trying to make a condition where I would check if there is a value in List , so I created the following: private void Itens_Edit(object sender, EventArgs e) { if(editar == 1) { int a = Convert.ToInt3...
asked by 18.05.2017 / 19:43
1
answer

Detect when there is a Windows tablet screen rotation

How do I identify when there has been a rotation of the Windows tablet screen?     
asked by 13.02.2017 / 17:04
1
answer

Cast Forms with interface [closed]

I wanted to know what are the possibilities (but which is the most appropriate) to do an interface cast. public class ClasseTeste1 : IMinhaInterface { ... } public class ClasseTeste2 : IMinhaInterface { ... } See in the example that I'm usi...
asked by 01.02.2017 / 14:56
2
answers

Select where in in LINQ

How to convert the code select down into LINQ? select * from producao where id not in (select idProducao from bpi)     
asked by 17.02.2017 / 14:45
2
answers

How to edit data from a Table after postback in ASP.NET?

I have a Table in a Web Form in ASP.NET and just below in the same form I added a TextBox in which you fill in the fields to add a new row to the Table. The insertion part in the table works fine, but only once the second time I try to add anoth...
asked by 19.12.2013 / 16:07
2
answers

How to know how many "black" pixels are in a letter x, using an x source? [closed]

The question already says everything, in the way I was doing, I wrote several characters, printava and put the program to count one by one: /     
asked by 02.12.2016 / 01:10
4
answers

Currency style in a TextBox in WinForms

I need to put the text R $ in textbox so that it is in the following format:    R $: 1,200,58 I'm trying the following unsuccessful ways: textbox1.Text = Convert.ToDouble(textbox1.Text).ToString("C"); and textbox1.Text = De...
asked by 07.08.2014 / 14:05
2
answers

Search for a string anywhere in List C #

Good afternoon. I would like to know how to search for a given string anywhere in the list. Ex .: string "123". It can be in Pessoa.id , Pessoa.Nome , Endereco.id , Endereco.Rua or Endereco.CEP ; List of People...
asked by 13.10.2016 / 22:16
2
answers

Get the value by a comparison between C # arrays

Well, I have two arrays: 1st string[] pastasSistema = new string[] { "Content", "DataRv", "My Skype Received Files", "RootTools", "shared_dynco",...
asked by 05.10.2016 / 21:11