Questions tagged as 'c#'

5
answers

How do namespaces work in C #?

I'm studying C # and I came across namespaces . How does it work and when is it applied? If possible, some basic example.     
asked by 01.04.2014 / 01:17
5
answers

Abstract Class X Interface

What is the difference between an abstract class and an interface? I do not understand when I should use one or the other.     
asked by 31.01.2014 / 19:08
3
answers

Difference between the use of typeof and is

In C # when I need to check if a variable is of a certain type, I usually use the is : if(qualquerVariavel is int) Console.Write("A variável é int"); I know you can also check the type of a variable in other ways, one of them is u...
asked by 11.09.2015 / 21:14
1
answer

What is the difference between const and readonly?

Constants and read-only fields can not be modified, as can be seen in the documentation:    const   Fields and constant places are not variables and can not be modified .    readonly   When a field declaration includes a rea...
asked by 08.09.2016 / 17:17
2
answers

How does Stack work in C #?

I came to a part of my program where I have to apply a stack and wanted someone to give me a simple explanation and an example. The program that I am doing at the moment is a notepad where you create several "roles" to post something importan...
asked by 11.03.2014 / 23:06
3
answers

What is the difference between using virtual property or not in EF?

I have my models public class Cliente { public int Id {get;set;} public string Nome {get;set;} } and public class Pedido { public int Id {get;set;} public int ClienteId {get;set;} public virtual Cliente Cliente {get;set;} }...
asked by 04.03.2015 / 03:26
6
answers

Empty semicolon no error?

I was working on a project and unintentionally ran into the semicolon that ended up being inserted well after a if . I was intrigued because Visual Studio did not point as an error, and when trying to compile the project I was successful....
asked by 08.12.2015 / 18:33
2
answers

What does # mean in the name of some languages?

Maybe it's the simplest question possible, but what does # (sharp) mean in the name of the C # and F # languages?     
asked by 05.01.2016 / 14:15
4
answers

Is "private" in classes in C # optional?

What is the difference between private string abc = ""; and string abc = ""; ? Is there a difference or is it just the writing that changes? I did a test with and without the private and saw no difference, it worked equally. E...
asked by 12.09.2017 / 22:24
1
answer

OpenSSL and ASP.NET WebAPI

I'm developing an internal application, but in a certain module I'll need to traffic some sensitive data. A priori I thought about using SSL, but due to limitations ( non-technical ) I would not be able to do so, so I thought about using Open...
asked by 31.05.2016 / 13:56