Questions tagged as 'c#'

3
answers

Types of conversions in C #

What is the difference between these types of conversions? string nombre = "1234"; int i = (int)nombre; string nombre = "1234"; int i = Convert.ToInt32(nombre); string nombre = "1234"; int i = Int32.Parse(nombre);...
asked by 26.08.2017 / 02:42
1
answer

use of Sum SQL SERVER

I need to add everything that is in value; This is my query create procedure sp_DetalleDeduccionesEmpleado @inicio datetime, @final datetime, @emp int as select ded.DedId, sum(ded.DetDedEmpValor), emp.EmpId from Tbl_DetalleDeduccio...
asked by 27.10.2018 / 00:13
1
answer

How to jump a column in a datagrid to print the next one?

I have to print some documents, but when it comes to a document that does not exist it stops printing I need to be able to print it if it does not find it skip to the next field and continue printing the others public class imprimirmanifiesto...
asked by 24.09.2018 / 22:18
1
answer

When should I use async / await and when not?

I am working with the Entity Framework with ASP MVC and I have the following question, should I always use asynchronous methods? or what should I use to choose between one and the other? Asynchronous private static async Task AddStudent()...
asked by 09.10.2018 / 16:09
1
answer

Help with problem CS1586 visual studia next to MySQL

I do not understand why I get an error CS1586, specifically when I say new string[] class ConsultaMySQL { private MySqlConnection conexion = new MySqlConnection("server=localhost; database=thepacioli; Uid=root; pwd=Valentin_...
asked by 03.10.2018 / 04:43
1
answer

Increase ID in a DataRow

I find the following problem. I am starting with datatables and I am relizing inserts through datarow. everything works perfect until I want to try using an increment for an ID in position 0. The code: public Form1() { Initialize...
asked by 23.08.2018 / 23:42
1
answer

Doubt C #: print items List

Good I created the following List, and added several elements as I show next: List<Persona> personas = new List<Persona>(); personas.Add(new Persona("12345678C", "Juan Francisco Cabello")); personas.Add(new Persona("26810168B", "J...
asked by 27.11.2018 / 10:13
1
answer

How to know all the interfaces and methods that an object implements?

Is there any way to know at run time which Interfaces and which methods to implement an object instance at a given time without explicitly asking for them in the .NET (C #) environment?     
asked by 23.12.2016 / 09:19
3
answers

How to return a string format with C #?

I have the following value. String dato="SDI87H"; And I wish to return SD-I8-7H I've tried with String.Format("{0:##-##-##}", dato); But it is not, since the value that must be delivered is numeric, but in this case I must deliver...
asked by 05.09.2017 / 03:45
2
answers

How to register users in ASP.NET MVC?

My code is this to register users: [HttpPost] [ValidateAntiForgeryToken] public ActionResult RegistrarUsuario([Bind(Include = "estado")] Usuarios usuarios) { if (!ModelState.IsValid) { return RedirectTo...
asked by 11.04.2018 / 20:52