Questions tagged as 'c#'

1
answer

Close a recently opened process C #

I need to perform the execution of a process for a certain time, for which I start a process, and using a Timer after 10 minutes, I kill it using Kill() , I do it in the following way: using System.Diagnostics; using System.Thread...
asked by 04.01.2019 / 13:02
3
answers

Form Ajax + Dialog Jquery C # MVC

Good morning, I am trying to use a form
asked by 14.01.2016 / 19:25
2
answers

Use the if with arrays

For a university job I have to make a distributor. Now in one part I have to calculate how many coins I will return to give the change. For example I have a water drink that costs € 2.20 . The person pays with 3 so their change w...
asked by 28.11.2018 / 09:49
1
answer

How do I download image contained in PictureBox with database in C #?

I have a question that I can not solve and I am looking for your help ... I comment, I have a datagrid which has a column type image in which I use as a preview of my image that is loaded from a database. Often I have a button type column...
asked by 07.12.2018 / 23:00
1
answer

c # error when traversing objects dynamically

Good morning everyone. I have a webapi project assembled with the repository pattern and I need to make a modification to the answer that the _repository.getByFilter(...) method offers me. This returns a IQueryable and I need to...
asked by 06.09.2017 / 16:06
2
answers

Obtain the smallest and largest number of data in an array in C #

I know that for some this may be a question too easy, but I'm just starting with this programming. The exercise is about obtaining the highest and lowest value of 15 data. My problem is that I can not get the minimum value of the whole arrangeme...
asked by 13.04.2018 / 02:28
1
answer

Why does not String.Format work in a subtraction of textbox?

I have been trying to put thousands points in the heritage textbox for hours, which comes from a subtraction between less passive assets, but when it is subtracted when it is subtracted and it stops calculating, why does this happen? protected...
asked by 24.04.2018 / 15:14
1
answer

c # scroll txt from bottom to top

I have to go through a txt file but in the opposite direction to the usual, it would normally be something like this: using (var origen = new StreamWriter(rutaOrigen + "x.txt", true, System.Text.Encoding.Default)) { while ((lineaOrig...
asked by 31.05.2018 / 12:43
1
answer

SqlBulkCopy: Error inserting a DateTime

I have a table with this structure: Create Table dbo.DoesNotMakeSense ( Id Int Not Null Identity (1, 1), Name NVarChar(100), CreationDate DateTime Not Null, Constraint PK_DoesNotMakeSense Primary Key Clustered (Id Asc) ) On [Primary]...
asked by 15.03.2018 / 01:18
1
answer

Single Responsibility Principle

According to SOLID, Single Responsibility Principle says, It is of sole responsibility and says that each class must deal with only one task and that applies to its methods. I have a Save method which updates a record and also saves a record, it...
asked by 14.04.2016 / 22:38