Questions tagged as 'c#'

4
answers

TextBox accept numbers and commas

I need a textBox accept only numbers and commas. To accept numbers I'm doing this: private void textbox11_num(object sender, KeyPressEventArgs e) { if (!char.IsDigit(e.KeyChar)) { e.Handled = true;...
asked by 30.08.2016 / 13:18
2
answers

How to instantiate a class with abstract methods in C #

In Java we can implement abstract methods when instantiating a given class Thread threadA = new Thread(new Runnable(){ public void run(){ for(int i =0; i<2; i++){ System.out.println("This is thread : " +...
asked by 02.09.2014 / 18:31
3
answers

Intellisense disappears when the argument list is large

I'm using Visual Studio 2010 I noticed that when the list of constructor parameters is too large and does not fit on the screen Visual Studio no longer displays the builder parameters list. Is it possible to configure it to display all without d...
asked by 10.02.2014 / 13:06
3
answers

Media Player Classic libraries in my Windows Form project

I'm developing an application that will work as a player, but the videos inserted in my software will be of several different formats: avi, mp4, flv and etc ... for that reason I do not want to use windows media player, something more complete l...
asked by 11.03.2014 / 21:26
3
answers

Call a method automatically via a class class in .NET

I created a partial class for the model users where I implemented some custom functions, such as a function that takes the first and last name assigned and generates a handle , see example below: namespace E_Learning.Mode...
asked by 04.05.2016 / 17:13
2
answers

In C # is there variadic arguments? [duplicate]

In languages such as PHP 5.6 and Python , you can define "infinite arguments" (in PHP it is called vadicadic args ) in a function / method For example, you can define a function like this in PHP 5.6: function variadic($name, ...$args)...
asked by 14.06.2016 / 18:18
3
answers

Can not implicitly convert type 'object' to 'int'. An explicit conversion exists (are you missing a cast?)

I'm trying to develop code in my game but I'm having this error. ... case "cpsuser": Console.Write("Digite o apelido do usuário: "); string Nickname = Console.ReadLine(); Console.Write("Digite a quantidade de Cupons"); stri...
asked by 18.05.2016 / 16:26
1
answer

StreamReader is reading a line that does not exist?

I want to read a CSV file and save it to a table, but for some reason it still gives the following error:    System.NullReferenceException: 'Object reference not set to an instance of an object.'       line was null. I already ran the de...
asked by 12.08.2018 / 22:58
2
answers

Redeem code for an executable program?

I created a program to present in college, but due to problems in my HD, I lost his code and just got the executable I created to present it. Unfortunately, I also need the code and need to know if it is possible to redeem without having to crea...
asked by 17.07.2016 / 22:44
2
answers

SQL query taking too long and returning a Time Out error

I am trying to perform a query in SQL. Here is the method: public void excluirVenda(int Codigo) { Conexao conexao = new Conexao(); SqlCommand cmd = conexao.CreateCommand(); SqlTransaction transaction = null;...
asked by 05.10.2018 / 15:03