Questions tagged as '.net'

1
answer

Error while reassembling a string. Size is out

I can not complete this list, as it is: foreach (var item in text) { string[] linha = item.Split('\n'); foreach (var i in linha) { string nova_string = i.Substring...
asked by 01.03.2016 / 18:24
3
answers

Interact / Search Button for your Tag using WPF

I have a screen with 25 buttons and would like to interact with the buttons through the code. For example, a number is generated using the Random function: Random rdn = new Random(); numero = rdn.Next(0,25); Let's say the result w...
asked by 15.10.2015 / 23:25
3
answers

Get the name textview in loop repeat

How can I get the textbox inside a For: I have a For that runs 20 times and I have 20 textboxes on my screen, I would like to know how to get all textboxes containing name get the text and play in an array.     
asked by 05.02.2016 / 19:11
1
answer

How to add more than one string in a List

I have a customer registration system and am trying to add products to registered customers. For the list of the cadastre I have the following: public class Cliente { public string Nome { get; set; } public string CPF { get; set; }...
asked by 03.11.2014 / 21:59
1
answer

How to save the same object using the .net MVC entityFramework in the database?

I need to update to a table in the database using entityFramework, because when I update a value of a field and I send save, it gives error. Please someone have a way to solve this ?? grateful usuarioVM.ContatoUsuarios = ContatoUsuari...
asked by 13.01.2015 / 19:08
1
answer

How to insert values inside a key using List and JSON

I'm trying to do something that gives me output like this: [ { "Nome": "João", "Comprou": [ "Carro": "Sedan", "Preco": "12000", "Moto": "Honda", "Preco": "8000"...
asked by 30.10.2014 / 21:04
1
answer

How to fill a ListBox using multi thread in VB .NET?

In a Windows Form Application I have a List Box that is populated from a list of IP's. It works like this: there is a text file ( config.eep ) that contains a series of IP's, at the press of a button to update the List Box, a loop is cal...
asked by 31.01.2014 / 19:42
2
answers

Move picture (PictureBox) in form

How to move an image into a form windows form. I used the following code: private void button1_Click(object sender, EventArgs e) { int tamanhoFundo = picFundo.Width; int x = myPic.Location.X; int y = myPic.Location.Y; while...
asked by 05.01.2015 / 19:24
2
answers

What is the best way to add a static method to an existing C # class?

I'm creating a restfull application that uses the Newtonsoft library to send information through controllers . In my application, I have numerous classes like for example the user: public class UsuarioModel { public int Id { get; set;...
asked by 23.11.2018 / 14:54
1
answer

Error: The system can not find the specified file [C #]

   Win32Exception (0x80004005):               The system can not find the file specified in System.Diagnostics.Process.StartWithCreateProcess (ProcessStartInfo startInfo) When trying to run a newly published program I came across this error,...
asked by 15.10.2018 / 16:24