Questions tagged as 'c#'

2
answers

How do I get a value between brackets in the string?

I have a string that will vary the values, I need to get the values inside the [], {"time_zones":[]} In case it would be empty, it could be filled: {"time_zones":[teste]} I'm trying to do this var palavras = a.Split('['); var palav...
asked by 13.06.2018 / 21:24
1
answer

How to do a split of a DateTime column from a query by the Entity Framework?

I have a field of type DateTime? (null allowed) that is in the complete date / time format (dd / mm / yyyy hh: mm: ss). I need to display the date and time in separate columns in a datagridview. I tried to use DbFunctions.TruncateTi...
asked by 15.06.2018 / 14:55
1
answer

Is Xamarin a viable option for mobile development? [closed]

I need to develop for mobile and I was thinking about Xamarin as an option, and then I went to search and found: Xamarin is paid, and the price is half salty for a single individual license. There is no way to develop the 100% C # app, mos...
asked by 06.10.2015 / 01:39
3
answers

Problem converting int to string

I'm trying to do a click counter in ASP.NET webforms and C #, and I need to convert the% number of clicks to a string in the label . But this does not work, the page is displayed but the number of clicks (the label ) does not appear. Code...
asked by 12.10.2015 / 22:39
2
answers

Remove all records from a table with Entity framework 6

How to delete all data from a database table using EF6 without having to query (do I want to delete all records)?     
asked by 20.10.2015 / 17:59
2
answers

Excessive line break when creating C # .txt file?

I am trying to generate a .txt file from a code list retrieved from the database. However, when the file is generated, line breaks are excessive, as shown below:    Thecodeisasfollows,beingaforeachthattraversestheentirelistofobjectsre...
asked by 03.04.2017 / 15:53
2
answers

Download PDF file by link in email

I developed a function that passing the Item id it generates a PDF file. [HttpPut] public void GerarPDF(long idItem) { ....Função } It already works perfectly, I did the test through the Google Chrome app called PostMan, and passing the pat...
asked by 22.03.2017 / 15:40
2
answers

Define date and time format used by DateTime

I have an application where it has record time, which uses DateTime.Now , and a start date and end date that the user informs. Showing this data in a DataGrid is in MM/dd/yyyy hh:mm tt format. I want it to be shown in the Bra...
asked by 09.09.2015 / 18:35
2
answers

Dapper requires writing SQL code, why?

I'm looking at the following link using Dapper: Getting Started With PostgreSQL Using Dapper In .NET Core and my question is, when I do it through Java I do not need to write the SQL code as this example here: //1. Insert using (var conn =...
asked by 17.08.2018 / 22:06
1
answer

DateTime.Now or DateTime.UtcNow

What is the difference between DateTime.Now and DateTime.UtcNow ? DateTime dateNow = DateTime.Now; // retorna {01/08/2018 18:28:15} DateTime dateUtfNow = DateTime.UtcNow; // retorna {01/08/2018 21:28:15} My computer clock looks...
asked by 01.08.2018 / 23:32