Questions tagged as 'c#'

3
answers

How do I delete a file marked with the "read only" attribute?

I'm trying to delete a file that is marked with the "read-only" attribute: Wheneverthefileismarkedwiththisattribute,Igetthefollowingexception:  System.UnauthorizedAccessExceptionwasunhandledIfitisafilewhose"Read-only" attribute is unchecked,...
asked by 03.01.2014 / 19:14
2
answers

How do I prevent a property from being mapped to an entity in the Entity Framework?

I need to insert a property in the template class, but when I enter the code first, it says that the table already exists and changes have been made. My code: public class Data { [Key] public int Id { get; set; }...
asked by 04.03.2014 / 15:37
2
answers

App - Xamarin or Ionic?

I need to create an App and would like to know which of your technologies is best suited for mobile development. What is the main difference between Xamarin and Ionic? Which of the technologies is the most performative? Why use Ionic? Wh...
asked by 27.04.2018 / 15:27
2
answers

Differences between declarations of variables in C #

What's the difference between these statements: Classex xx = new Classex(); var xx = new Classex(); Classex xx; If at the end I can use everything in the same way (methods, properties ...) Ex: I create a list: List<Classex> l...
asked by 29.05.2018 / 22:16
2
answers

What would this "k_BackingField"

I'm having a project to create a Smart Device in C # for Windows CE. I received a reverse engineering result code, but it has a part that I can not understand or adapt. Here is the code: private string <codProduto>k__BackingField; privat...
asked by 14.06.2018 / 06:00
2
answers

Create 'prop' or 'propfull' shortcut in Visual Studio

I would like to create within Visual Studio a shortcut of type prop or propfull so that it automatically creates a snippet of code. TAB public int MyProperty { get; set; } TAB private int myVar; public int MyProperty {...
asked by 18.05.2018 / 18:06
4
answers

Why can not we return a void call on a method that expects void return?

I was doing C # tests to find out how the void return issue works. I did the following test below and realized that tests 1 and 3 work perfectly, but 2 does not. See: public class Program { public void Test1() { }...
asked by 06.12.2017 / 20:02
3
answers

Application that does not need to load entire page

How can I create an application in MVC C# with Razor , where I have a Layout and then only update the central content and not the page as a whole. I have read some places to use AJAX other to use PartialView . But wh...
asked by 21.05.2014 / 21:17
3
answers

How to replace dynamic string {{snippet}} from a string in C #

I get a string which is dynamically generated example: "Dynamic text {{parametro1}}, plus a piece of text {{parametro2}}." I have a code similar to this in C #: where the name is the same as in braces and the value property is the one that...
asked by 05.06.2016 / 23:23
2
answers

Inheritance Modeling MySQL and C #

I am having a question about modeling a DesktopApplication system in C # with MySQL. Essentially I will have the Client, Supplier, PF and PJ entities. PF can be a customer or supplier. And PJ can also be a customer or supplier. My goal is to...
asked by 09.03.2016 / 20:24