Questions tagged as 'c#'

2
answers

Get information from the sender object

How does the search for information through the sender object work, and in what situations can I use it, with what types of events? This is to avoid redundancy of events. Where can I explore these possibilities? For example : several buttons fro...
asked by 31.05.2014 / 04:25
2
answers

What is the reason for using DbMigration in CodeFirst?

What is the purpose of using DbMigration when developing a project using CodeFirst? Is using it a good practice, or is it something that does not cause major impacts on the implementation and / or maintenance of the system?     
asked by 22.06.2014 / 00:37
1
answer

How to make the properties of a User Control accessible in XAML?

A User Control can be used for a variety of purposes, but I'd like to know specifically a simple example of how to create a User Control / p> For example a NumericUpDown : CreatedfromthisXAML:<UserControlx:Class="TCC_2.Templates.Nu...
asked by 18.12.2016 / 21:12
2
answers

await Task.WhenAll how to run multiple processes?

I am trying to create several task (async) they will execute the following logic: Parse an Html based on a url received with the HtmlAgilityPack Return a product model after parse Insert the Product into the database Download product i...
asked by 11.10.2016 / 20:36
2
answers

Why when I delete or edit table record x is also removed from table y?

I have a system in ASP MVC with C # entity . I have the table Pedidos and Agenda . In the agenda table I have a column with id of the request. When the request is canceled, I have to remove from the...
asked by 04.11.2016 / 15:29
1
answer

Write date of inclusion using entity framework

I believe there has been a misinterpretation, I am posting the code to be better understood. I'm using a project for my EF Repository inside it I have: Notice the doubt in //CompanySave.DATA_IND = DateTime.Now; This is possible. using Syste...
asked by 17.09.2015 / 03:06
3
answers

Transform a string into several substrings whose contents are in apostrophes

I am creating a program in C # that reads a text file and one of the lines of this file has the following format: 'Column 1' 'Column 2' 'Column 3' I want to turn this line into an array of strings so that the answer looks like this:...
asked by 25.11.2016 / 18:44
1
answer

Special Characters in StreamWriter with Encoding.ASCII C #

I am writing to a file via StreamWriter using Encoding.ASCII encoding. A situation appeared in which I need to write the letter "Ç". But if I try to do this, the file exits the "?" Character. In this case, I need to use this encoding (I can n...
asked by 02.10.2015 / 14:22
1
answer

Is it possible to hide a public method of the abstract class?

I have the following scenario: public abstract class ClasseA { public string[] MetodoC(string parametro, string nomeObjeto) { // ações metodo } } public class ClasseB : ClasseA { public string[] MetodoD(string...
asked by 20.08.2015 / 17:44
2
answers

Cross-origin request blocked

Hello, I'm trying to load a page from another application inside a div from my application using the jQuery load but my application is not loading the page and it shows the following error message: Cross-origin request blocked: Same Origin Pol...
asked by 07.08.2015 / 17:06