I need to check how to make a comparison between strings , in C #, using the Contains() method that disregards both accent sensitivity and case / strong> of a string .
Example:
var mainStr = "Acentuação";
mainStr.Contains("acen...
I have a Chromosome object :
public List<int> Rotas { get; set; }
public int ValorFitness { get; set; }
And I also have a list of this object List<Cromossomo> .
I would like to sort this list by the property ValorFit...
Staff have a my C # code that has the code:
Uri resultadoURL;
bool resultado = Uri.TryCreate(Configuracoes.Configuracao.URL, UriKind.Absolute, out resultadoURL) && resultadoURL.Scheme == Uri.UriSchemeHttp;
if (!resultado)
throw ne...
I have a question and would like to better understand how class instantiation works. More specifically the most appropriate way of doing (if any) and the impacts of doing the wrong thing.
Assuming these two scenarios, which one should I use a...
Today I have the code below, which saves a file in CSV format.
What do I need to change to save in XLSX (Excel) format?
public static void buildCSV(string filename = "resultado.xlsx")
{
Console.WriteLine("Escrevendo no a...
I have this code that passes parameters to my controller:
var id = $(Musico).val();
var url = '@Url.Action("Votar","Chamada")';
var tipo = 1;
$.ajax({
url: url,
data: {
id:id, tipo:tipo
}
});
My controller:
public...
How to implement a class so that I can add an exception to an exception list.
This class would be used for the case below, for example:
In the validation method it can return one or more errors, so each error is added an exception in the l...