Questions tagged as 'c#'

2
answers

Operator? when writing data types

I have a curiosity and I want to get rid of the doubt, in which cases a variable is declared in the following way: public short? Secuendia {get; set;} What does the question mark mean and in which cases the data type is accompanied by a cha...
asked by 01.04.2016 / 00:18
7
answers

Get Foreach index in C #

Normally I do iterations using the control statement for and so I get the index of the iteration easily, but the question I have is, is there any way to get the index of the iteration in a foreach c# ? since I usually tak...
asked by 09.05.2016 / 23:27
4
answers

How to Join Arrangements in C #

I need to join 2 Arrays type string and that all the data remain in a single arrangement it sounds like it can be done but I do not know how to achieve this     
asked by 28.03.2017 / 23:20
3
answers

Validations of fields in C #

I am learning and recently in a desktop application with which we work in the room we enter the subject of validations. We were taught something like this: if(textbox.text == "" ){ MessageBox.Show("hacen falta campos por llenar") } Thi...
asked by 05.03.2017 / 06:19
2
answers

How to wait a certain amount of time between each execution of a method

All to all, I have an application that consumes several web services. What this application does that gets many users and creates entries in a .csv file for several projects. I would like to do the execution for a certain amount of users,...
asked by 29.04.2016 / 21:45
3
answers

Remove accents from a string in C #

I have searched but I can not find what I need, although I find solutions to replace but I can not find a solution to help me. I have an input string with accents and I need to check out the accents, my code: string palabra = "pálábrá cón t...
asked by 31.08.2018 / 17:24
2
answers

Web API 2, OData v4 and Automapper

I have a problem that I have no idea how I can fix it. I have a class as follows: public class Message { public long Id { get; set; } public DateTime DateCreated { get; set; } public DateTime DateModified { get; set; }...
asked by 11.12.2015 / 00:25
3
answers

Read by CSharp console

I am starting in the world of programming and I have just solved the following exercise. Ingresar un número y mostrar la suma de los números que lo anteceden. Al ingresar el 5 me da como resultado el 10 . As I do so that by entering the c...
asked by 05.08.2018 / 21:41
2
answers

Add the diagonal of the matrix

I have a matrix and take the diagonal, but do not add the values that exist, could you help me please? This is my code: int i,j, filas=0, columnas=0,sumadiagonal=0; Console.WriteLine("filas?"); filas = Convert.ToInt16(C...
asked by 03.08.2017 / 06:20
1
answer

Doubt with delegates C #

Very good, I'm trying to understand the next part of this code ... public void actualizarUI(string s) { Func<int> del = delegate () { txttcpResultados.AppendText(s + Env...
asked by 19.06.2017 / 08:05