Questions tagged as 'c#'

1
answer

Is a URL important?

Most languages have methods to encode and decode a URL, such as C # System.Net.WebUtility.UrlEncode(string value) and System.Net.WebUtility.UrlDecode(string encodedValue) . I realized that when I use some language methods for Ur...
asked by 23.01.2018 / 06:51
1
answer

Difference between @Html.LabelFor and @Html.DisplayNameFor

I'm starting in ASP.NET MVC and doing a course where the teacher used to display data from a class different methods for displaying a given. It uses @Html.LabelFor and @Html.DisplayNameFor . From what I have read in other forums%...
asked by 12.01.2018 / 17:25
1
answer

Error 403 - the web server is configured not to list the content

I'm having trouble running my local server in Visual Studio 2013. When I try to run my application the following screen appears: If you need anything else, let me know what I'm editing and I'll put it here.     
asked by 26.06.2015 / 02:22
2
answers

visual studio sql error

Well, I'm new to C # and then I'm seeing a few database connection tutorials that appear to me this error: ThecodeI'vedoneisallstillbasedonabasictutorialandI'llleaveithereforyoutosee using System; using System.Data.SqlClient; using System....
asked by 13.07.2015 / 12:17
2
answers

Fluent API and Migration

I have the following scenario: public abstract class Pessoa { /* Propriedades do Pessoa*/ public Guid IdPessoa { get; set; } } public class Cliente : Pessoa { public Cliente() { IdPessoa = Guid.NewGuid(); Endereco...
asked by 21.01.2016 / 22:35
1
answer

Error trying to add numbers to an array of int32

I'm trying to store an array of ints to use periostealmente, but I came across a syntax error in the part. { 4, 7, 8, 9, 10 } private Int32[] m_FluxosPlataformas = null; public Int32[] FluxosPlataformas { get...
asked by 16.02.2016 / 13:23
3
answers

Conversion of encoding string

I have the following string Cinto De Segurança How do I convert her to stay as Cinto De Segurança     
asked by 03.04.2018 / 19:56
2
answers

Update OLEDB Not working

Good afternoon, I'm trying to update an excel worksheet but the command is not changing any values, it's just corrupting the worksheet. I create the last two columns and rewrite the other connection.ConnectionString = "Provider=Microsoft.AC...
asked by 02.02.2018 / 18:12
2
answers

How to get time difference between two DateTime variables in C #

I have two variables DateTime , which are DataCadastro and DataAtual(DateTime.Now) . I need to know if the time difference between these two dates is greater than or equal to 4 hours. Is there a method in the DateTime class th...
asked by 23.09.2015 / 15:28
1
answer

How to get the application to be locked / unlocked at Windows startup?

I want to make an application that will have an option to call Regedit and the user will be able to choose whether to block or unblock for the application to start with Windows. I've already looked at a number of websites and even here on S...
asked by 27.04.2016 / 06:00