Questions tagged as 'c#'

3
answers

get data with linq for a C # chart?

I send it as Data type List to a chart but the data is not displayed, check the method that makes the query and if you return the values, but chart does not load them public void loadDataLinq() { this.chart1.Palette = ChartColorP...
asked by 23.01.2018 / 15:50
1
answer

SQL Check between date range - but a date may be NULL

Good day community. I need to make a query in SQL (Sql Server 2012) to filter by a range of dates (Start Date - Term Date). The table is as follows: DETENTIONS ID ESTADO EQUIPO FECHAINICIO FECHATERMINO The Problem, is that some...
asked by 04.09.2017 / 16:26
3
answers

how to insert last 5 characters of a string?

Hello, what happens is that I have a system in asp.net and c # in which the user must enter 15 numbers in a textbox, but only the last 5 of them must be saved in a database field. Nose if there is any SQL function to do that, or pass the last di...
asked by 05.05.2018 / 19:32
1
answer

Space Invaders AI Shooter UNITY3D

I have a question about the Spaces Invaders AI: If you see below in the images of the game, the invaders at the time of shooting, shoot the closest to the player in the form of a grid That is to say: they will always start shooting the f...
asked by 20.01.2016 / 03:11
2
answers

Conditional error in foreach using ASP.Net MVC

Partners of Stack Overflow in Spanish, I have the following error when doing this conditional ViewBag.p.Where(n => n.Lider == namelider in cycle foreach . Here I show you part of my code: <table class="table table-bordere...
asked by 11.07.2017 / 23:42
3
answers

How to convert a ComboBox from String to Int?

I need to converge a ComboBox to which I call cmbmes . The reality is that it does not work with Convert.ToInt32() or with Int.Parse() . The error that gives me in specific is System.FormatException . What I want to a...
asked by 30.05.2018 / 17:13
2
answers

Reinstall service with another name

Currently I have a service (Service 1) of windows working correctly. I have made an improvement and I have called it Service 2 and I want to install it, but I want to stop Service 1 first and then install and launch Service 2 to see if it fails...
asked by 09.01.2018 / 14:50
2
answers

What is the correct way to pass a date as a parameter?

I always have problems with dates when wanting to pass them as a parameter to a SQL statement, I try to use a previous variable, a Convert or a Cast but I never find the correct way. I have the following statement in C # where I...
asked by 18.05.2016 / 19:47
3
answers

Pass null values from C # to sql server

At the moment I am making a form in which I hide some fields in order to fill them when editing. The drawback is that clicking on save generates an error of type La cadena de entrada no tiene el formato correcto. and is because the fie...
asked by 12.05.2018 / 00:53
2
answers

Execute action every day at the same time in C #

I am working on a Console application that must perform some actions at certain times of the day (I clarify that it is not a service because I need the execution of processes) The issue is that I must start an application at a certain time an...
asked by 12.11.2018 / 17:51