Questions tagged as 'c#'

2
answers

decimal point is lost in the getter and setter

I have a problem with some getter and setter, these are the properties public double PrecioUnitario { get { return _PrecioUnitario; } set { _PrecioUnitario = value; } } private double _SubTotal; public double SubTotal { get { ret...
asked by 04.01.2018 / 05:57
1
answer

How to enable a cell of a datagridview?

query, I have a datagrid with an edit button, I want to click on it to enable me certain cells, not all, how could I do it? My code so far: if (datagridview1.CurrentRow != null) datagridview1.CurrentRow.ReadOnly = false...
asked by 03.01.2018 / 19:06
1
answer

Problems with coding in Base64 C # [closed]

When trying to perform these functions (with salt being a string of 32 characters and passing a string of a variable number of characters): public static string encodePassword(string salt, string pass) { pass = mod4(pass); /// Necesitamos...
asked by 15.12.2017 / 11:53
1
answer

How to access the elements of an array Arraylist? [closed]

How could I access this type of arraylist? List<String[]> arraylist1= new List<String[]>; String[] splits = Str.Split(';'); The question is, how can I get the information for the second position in the array? _________________...
asked by 04.12.2017 / 13:37
2
answers

Habili Menus by MDI Parent

Good afternoon everyone, I have the following existential doubt, I have a WindowsForms MDI Parent form , in which I show a series of windows, but in the event Load I need to upload a Login form , which, by pressing the Validate button, if...
asked by 02.12.2017 / 00:33
2
answers

Perform unit tests on a sealed class that internally contains private classes

I have a class of type sealed that contains some internal private classes with public methods within them. My task is to test the public methods that are within those private classes, but I know in advance that the methods (including t...
asked by 02.11.2017 / 07:30
1
answer

Traffic light in c # using threads

When I start the thread do not even change the images before I get to the sleep, how do I put the thread correctly, or what change do I need to make it work? using System; using System.Threading; using System.Windows.Forms; using System.Drawin...
asked by 31.10.2017 / 02:49
1
answer

Driver with two post methods in a web api

I'm doing an api web service with c #. In a controller I need to have two post methods. Right now, I have something like this. public class TramitesController : ApiController { [ResponseType(typeof(Tramite))] [BasicAut...
asked by 09.01.2018 / 19:59
1
answer

How to know if the query is running correctly?

Have a good day, today I come with a problem that I have not been able to solve. I am working with C # .Net and a base in Microsoft Access, I am wanting to do an Update to a table. The problem is that I do not know if I am correctly executing...
asked by 11.01.2018 / 04:29
1
answer

How is a two-dimensional array directly instantiated by giving it parameters in the new?

In the case of being an array of a single serious dimension; new Vectores().ComprobarMenor(new int[] { 2, 4, 66, 6, 3, 7, 2, 7, 2, 13, 6 ,0}); But if they are two dimensions?     
asked by 05.11.2017 / 16:39