Questions tagged as 'c#'

1
answer

What is FileStream for?

I was reviewing my C # classes when I came across this SaveFileDialog f = new SaveFileDialog(); f.Filter = "Archivo de Texto (.txt)|*.txt"; if (f.ShowDialog() == DialogResult.OK) { StreamWriter w = n...
asked by 23.10.2018 / 00:27
1
answer

How can I add two long integers passed as a string? c #

First of all, I want to thank you for your time when it comes to reading my question. I am new to c # and in programming in general, and I am having problems with something simple. I want to add two long integers as a string of text, I have reac...
asked by 06.07.2018 / 20:25
1
answer

How to fill a dataDable with the value of a textBox?

I want to pass the value of a textbox to a dataTable valor.Text = dataTable... I do not use Database.     
asked by 11.05.2018 / 19:38
1
answer

Mysql Transaction (Mysql)

I have a concern as I can improve this query. Well, I'm learning to use Transaction. one of my doubts is how can I use the rollback on error DELIMITER $$ CREATE PROCEDURE sp_insert_transaction( IN _id_usuario INT, IN _id_proveedor INT, IN _fec...
asked by 04.05.2018 / 17:47
1
answer

Why does not the data annotation StringLength [] and MaxValuie [] work for me?

I am having problems to implement the asp.net mvc 5 annotations. When designing my model, I put the [StringLength] annotation to validate that the user enters a minimum and maximum number of digits. It works well, but at the moment of mak...
asked by 28.05.2018 / 18:07
3
answers

Pass parameter in task using lambda

I have this afternoon ... void TareaFecha() { Task T = new Task(() => { DateTime FechaActual = DateTime.Today; DateTime Inicio = FechaActual.AddDays(8); MessageBox.Show($"TareaFech...
asked by 19.10.2017 / 16:54
1
answer

ArrayList in C # .Net Core: "The name of the type or namespace" ArrayList "was not found"

I'm trying to instantiate an object of the ArrayList class but the compiler does not recognize the class ... Use System.Collections and System.Collections.Generic but there's no way ... All the examples I see do not do anything tha...
asked by 14.10.2017 / 10:34
4
answers

Access modifier "Internal" What is it for? C #

What is the use of this modifier? It is not entirely clear to me when you let Visual Studio create methods for you (for example, writing a method that does not exist in an object and that IntelliSense implements the method for you ...) Always (o...
asked by 04.04.2018 / 19:20
1
answer

Get hostname from MVC

I have a form that every time a record is inserted or modified it adds the hostname in an SQL field, the detail that when I pass the system to the server where it would be hosted, it puts me the hostname of the server. Could I somehow get the ho...
asked by 19.05.2018 / 01:13
1
answer

C # format of a cell in excel

I need to open an excel file xlsx to remove the commas from a pair of tables so that I can convert the file to .csv . I want to know if I can do this with a NumberFormat or something similar? I'm starting from row 15, that's where the infor...
asked by 28.08.2018 / 00:31