Questions tagged as 'c#'

1
answer

How to get a C # Liststring and send to a JS variable?

I'm developing in an Asp.net C # project and I'm not sure how to get a list of strings from my class on the page. How do I get these values? Code that I've used. var pontos= rota.ObterCordenadas(this._gvConsultaCheck, txtDtInicial...
asked by 29.04.2015 / 15:38
1
answer

Mapping Code First with Data Annotations

I'm creating a project using DataAnnotations mapping with Code First (similar to Hibernate ), without using FluentAPI . It turns out that by implementing this process, some exceptions are being raised and I believe it is due t...
asked by 21.06.2014 / 03:10
3
answers

How to download an image from the internet with C #?

For example, I need to download a sequence of images: http://www.simepar.br/site/fragmentos/radar/simepar_24.gif http://www.simepar.br/site/fragmentos/radar/simepar_23.gif http://www.simepar.br/site/fragmentos/radar/simepar_22.gif How would...
asked by 05.03.2014 / 18:29
1
answer

Help with configuring DbContext with EntityFramework using good practices

I have my application layered with Class Library and my layer with Entity Framework , where I set DbContext , it's Repository . My class inherited from DbContext: public class Context : DbContext { private stati...
asked by 18.03.2014 / 01:36
2
answers

Are static classes shared by threads?

Are static classes, methods, and properties shared across the application's threads? That is, if I modify the static property foo in ThreadA , and then modify the same static property foo in ThreadB , what will be th...
asked by 16.06.2016 / 15:32
3
answers

Keep application (Windows Form) open in the icon tray with C #

When you close the application (either close button, ALT F4 , or any method other than the process manager), continue running in the Windows Icon Tray: And is it too complicated to make a menu when you click the context button (usual...
asked by 07.10.2015 / 12:43
2
answers

ListView or GridView in Windows Forms

I am studying about Windows Forms Application . I did a tutorial where the ListView is used to display the data of a search according to the parameters passed. But I noticed that there is also GridView to use in the toolbox. And in this o...
asked by 29.04.2015 / 22:05
2
answers

Boxing is copying the dice

Boxing is to turn value type into reference type, right? But when we copy a reference type into another reference type , it just copies the address, not the value. But when I convert int to object for example and copy to an...
asked by 20.03.2015 / 17:20
1
answer

Change template classes in Visual Studio

Is there a way to configure Visual Studio to create classes with public ? When you create a class by template, either from the dropdown menu of a mouse over a class name that does not exist yet, or by adding a class to a project, they a...
asked by 13.11.2014 / 01:01
3
answers

Difference between Console.Read (); and Console.ReadLine ();

I'm starting to learn C # and got a little confused by one thing. What is the real difference between Console.Read(); and Console.ReadLine(); ?     
asked by 16.02.2015 / 23:37