Questions tagged as 'c#'

1
answer

How to shuffle list of strings in C #?

I have a console application, in which the list exists: List <string> ListaFrases = new List<string>(); This list is built through the user inputs on the console. How to display your strings, but so that their positions are "sh...
asked by 03.10.2017 / 22:18
1
answer

What is the best type to store area, volume, perimeter? [duplicate]

Decimal , Numeric or Float . What is the best option to store area or volume? I would use Decimal, but I would like to see the views of others as well. It does not seem like it, but the right kind or the closest of that make...
asked by 21.11.2017 / 17:56
1
answer

In C #, how to use the pluralize method in Portuguese?

In a C # application I want to pluralize a few words in Portuguese. But apparently there is no native support for pt-BR. var pluralizador = System.Data.Entity.Design.PluralizationServices.PluralizationService.CreateService(new System.Globaliza...
asked by 15.07.2016 / 18:50
2
answers

Remove the time part of a date in C #

This is not working right here: DateTime? _data = calDataExclusao.Date; string nova_data = _data.ToString("dd/mm/yyyy"); The error is:    No overload for method 'ToString' takes 1 arguments How do I remove the time part of a date?  ...
asked by 08.12.2015 / 17:03
4
answers

recursive superfatorial problem

I'm having a question about how to do this recursive math function. Calculation of the superfatorial: The super-factorial of an N number is defined by the product of the first N factorials Thus, the superfatorial of 4 is sf (4) = 1! * 2!...
asked by 07.09.2015 / 17:11
3
answers

Keep zero after the comma using float type?

I have a database where product values are stored. When zero numbers occur after the commas they come with zero. I did a test and with decimal it worked, but my application uses float , so I need to work with float . decimal numero = d...
asked by 03.02.2014 / 18:08
2
answers

How do I shut down, restart, sleep programmatically?

I would like to add these options to a program, after finishing a task the computer would be shut down / restarted / placed in sleep . How can I do this?     
asked by 21.12.2013 / 03:23
3
answers

Enter page using the bank ID in ASP.NET

I need to make a page that can be accessed in the following format: www.exemplo.com/id/123qwe This 123qwe is the ID of a line in the database, where I will get all the data to fill the page. So far I've been able to...
asked by 24.02.2014 / 14:15
1
answer

Select data from two tables to display in a column?

Consider the tables for the customer registry: Person Table |ID|NOME|TIPO|EMAIL| Physical Table |ID|CPF| Legal person table |ID| CNPJ| inscricao_municipal| inscricao_estadual| My goal is to consult the data of all people,...
asked by 26.01.2016 / 19:20
1
answer

Doubts with Arrays in C #

Good evening, everyone. I'm a beginner in programming and I have two questions: When a double-array in C # exists, each array position starts as null or zero? Is there a method that returns the last OCCUPIED position of an array? For ex...
asked by 15.12.2015 / 23:34