Questions tagged as 'c#'

2
answers

Obtain local IP in C # in UWP

How can you get the ip of the device in C #? That works in the field of UWP (Universal Windows Platform) known as universal applications of windows10     
asked by 05.01.2016 / 19:29
2
answers

Fill space for a control within a panel in c #

I continue with my project in Winforms C # and I have many problems since I only know WPF and Silverlight, which is very similar. In WPF if I put, in XAML : HorizontalAlignment="Strench" VerticalAlignment="Strench" Without...
asked by 31.12.2015 / 16:35
2
answers

Are these expressions the same?

Good, fiddling with C # and C ++ I've found that the following type of expressions is valid: int A, B, C, D, E; A = B = C = D = E = 1; According to this action, I am assigning 1 in E , E in D and so on, until the end....
asked by 02.06.2016 / 22:12
2
answers

Go through a ListBox and put its items in an array

I fill a list from OpenFileDialog and I put it in "file" and then put it on the list like this: foreach (string file in selectedFiles) { ListBoxItem lstItem = new ListBoxItem(); lstItem.Content = file; //File es la cadena de la...
asked by 22.04.2016 / 13:46
1
answer

Errors when inserting records using EF

I have this method that receives a list of type VentasLinias and inserts each record in the database public void InsertLines(int idVenta , List<VentasLinias> listVentas) { foreach (VentasLinias vl in listVentas) {...
asked by 24.05.2017 / 17:31
2
answers

Error in foreach

As I recently started programming in .NET C # I still do not have much idea of how it works ... I have a table with 7 records in a database. But when I do a SELECT of that table from my class, it only takes the values of the last record ......
asked by 31.03.2017 / 16:55
5
answers

How to create a rectangle using asterisks in C # (for cycle)

(For) Create a program that asks the user for width (for example, 5) and height (for example, 4) and write a rectangle formed by that number of asterisks, eg: At the moment I have this: Console.WriteLine("introduce el tamañno de cuadr...
asked by 14.08.2018 / 17:16
3
answers

LINQ query in .NET VISUAL STUDIO

I need to translate the following query from SQL to LINQ in .NET with C #: This is the SQL query to translate: SELECT COUNT(id_documento) FROM documento I need the value to be stored in a variable or to capture the n...
asked by 08.04.2018 / 06:09
3
answers

Voidable types in Java equivalent to those in C #, possible?

The main purpose of this question is to contribute content to Stack Overflow in Spanish In C # we can convert data types (that do not accept the null value) to be nullable; assigning null to this type of data, produces a syntax error since C...
asked by 04.05.2018 / 02:43
1
answer

Application in C # start in Textbox in specific

Good morning, I have this little doubt, what happens when running my application as seen inside the image starts already selected a radiobutton. My question is: How can I select so that at the moment of running the application I start in t...
asked by 28.07.2018 / 01:56