Questions tagged as 'c#'

2
answers

How do I get the first character of a String and make it uppercase by storing it in a variable?

String user,newUser,newPassword, password, resposta, user1,pass1; user = "admin"; password = "123"; Console.WriteLine("LOGIN\n"); body: Console.WriteLine("Ja possui login?"); resposta = Console...
asked by 06.09.2018 / 21:36
2
answers

Send parameters to a C #

I created a class called descricaoo that will receive some data parameters and will add in a List of an interface called IInstrucao . But it gives an error "the description class is not implemented to an interface" How to cor...
asked by 29.10.2015 / 16:33
1
answer

How to deserialize JSON with C #

I have this JSON [{ "new_as_cod": "0010955", "as_nome": "NAME", "as_cpf": "1212121212", "as_email": "[email protected]", "as_cep": "88.025-200", "igr_nome": "1\u00aa IGREJA BATISTA - FLORIANOPOLIS", "id": "2781", "valor": "50.00", "pg_tipo_id": "C...
asked by 28.10.2015 / 14:14
2
answers

Definition and utility of partial class

What is the utility of partial class , and in what situations is it recommended to use them? I have some classes in a project that are partial classes and I suspect a supposed problem is related to this.     
asked by 26.03.2014 / 19:04
2
answers

What difference xmldocument vs xmlwriter?

What is the difference between the two classes? In what situation does each fit the best?     
asked by 14.03.2014 / 20:03
1
answer

Is there any way to compress data stored in byte []?

I get a byte[] that is an image, and saved in the database (Postgres) in a column byte[] todo. How can I compress? Leave lower this byte[] ?     
asked by 15.04.2014 / 19:10
1
answer

Entity framework with connection string via code

I'm developing an application, and I need the connection string to be defined in the code itself, since there can not be the app.config file.     
asked by 07.12.2014 / 17:10
2
answers

Put a GridView row with red color if a cell has the false value

I would like a particular row of my GridView to be red if the corresponding cell in the closed column is false. My ASP.Net looks like this: div class="GridMain"> <asp:GridView ID="gvInformationPeriod" runat=...
asked by 09.06.2014 / 16:15
1
answer

Convert enum variable to int in C #

I have the following code: enum type = { OPEN = 0, CLOSED, UNDEFINED}; list<int> frequencia = new list<int>(new int[] {0,0,0}); I would like to do the following operation: type t = enum.OPEN; frequencia[t]++; But I can not....
asked by 08.05.2014 / 19:04
2
answers

Pass parameter (a list object) from View (type List) to Controller. Asp.NET MVC

I have a View of type "List<SimpleUser>" and I want to pass to my controller the object that is in my foreach, however this is arriving null being done as follows: View: @{ ViewBag.Title = "Dashboard"; } <!-- search for...
asked by 02.06.2014 / 07:51