Questions tagged as 'c#'

2
answers

How do I always keep my URLs in lowercase?

I want all URLs on my site to be lowercase to help with SEO and for consistent link sharing. How can I do this?     
asked by 12.12.2013 / 15:08
2
answers

Write form data in session

I created an access form for my administrative area, using a tutorial from Microsoft . Now I need to retrieve the login that he typed to enter and show it on an admin page, and also to make future queries to the database. How can I do thi...
asked by 04.03.2014 / 01:48
2
answers

How to compare two string marking the differences?

Let's say I have strings : Oi, meu nome é ítalo and Olá, meu nome é ítalo How to generate a + result - like this: Hi , my name is Italo Hello , my name is Italo The system should mark somehow the part of s...
asked by 27.09.2017 / 02:23
2
answers

I need to know when the user uses semicolons in decimal numbers

I'm developing an exercise whose result is different in scenarios that the user uses semicolon to place their decimal number, in case I put it as a variable of type double Console.WriteLine("Caculadora de Imc\n\n\n"); Console.WriteLine(...
asked by 05.11.2017 / 00:17
2
answers

What are anonymous methods and what is their main purpose?

I know they're used to working with delegates , but the sources I found were a bit confusing in my opinion.     
asked by 04.10.2017 / 03:17
1
answer

What is the best validation strategy before the data persist? [closed]

I'm used to .NET using C # and EntityFramework. And there in Entity we have dataanotations . When I create the entity in C #, for example of person, just put the datanotaations and the Entity is valid for me: public partial cla...
asked by 23.10.2017 / 20:08
2
answers

Shortcut to create parameterized constructor

Is there any shortcut in Visual Studio, which creates a constructor, with all the attributes created in the class? class Alimento { public int ID { get; set; } public string Titulo { get; set; } public string SubTitulo { get; set;...
asked by 07.07.2015 / 15:47
1
answer

Relationship between different context classes Entity Framework

I have a problem saving an object because it has a relationship in a different context, I would like to know if there is a way to solve this problem.     
asked by 08.06.2015 / 20:48
3
answers

How to search for a file in all folders

How to create an application that performs a full search on a folder or disk looking for a file that neither in the image I've already tried to use Directory.GetFiles and Directory.GetDirectory But when it arrives at a folder...
asked by 16.07.2015 / 21:56
1
answer

Pagination with generic method

I'm trying to create a generic paging method, I tried to do as the code below, however when using Skip I need to have a orderby and I'm not sure how to do it. public IQueryable<TEntity> GetPaginacao(int PageStart, int PageS...
asked by 14.01.2016 / 15:29