Questions tagged as 'c#'

2
answers

Memory leak in XmlSerializer

I have the code below. Since the method is static and XmlSerializer does not implement Dispose , every method call, the system heaps in memory or GC garbage collector ) can clear this variable ? And in the case of c...
asked by 27.10.2015 / 17:21
2
answers

EntityFramework, Migrations and MySql. Schema name being misinterpreted. How to solve?

I'm having a problem using migrations with MySql . When I try to create the first version with Migrations it is making the schema / bank name part of the table name: public partial class Initial : DbMigration { public override...
asked by 03.07.2015 / 00:38
3
answers

Telephone fields and CPF in SQL?

I'm doubtful what kind of variable to create for the CPF and Phone fields in the database, they should be saved like this: (34) 9652-5214 134.124.214-47 With nchar would not complicate the search? But in the case of the nchar, how d...
asked by 03.07.2015 / 22:05
2
answers

Entity Framework 6 Async and .Wait () method

I have a system that is a Web Api, the control executes a class like this: public class CrawlBO { public void IniciaProcesso() { ... CarregaConfiguracaoCrawlBO carregaconfiguracaocrawlbo = new CarregaConfiguracaoCrawl...
asked by 12.06.2015 / 14:11
2
answers

Fill all fields of an Object in an iterative way

I have a Class public class Objeto { public int _numero { get; set; } public DateTime _data { get; set; } public string _palavra { get; set; } public decimal _decimal { get; set; } } Is it possible to do what I want with the...
asked by 05.03.2015 / 16:15
1
answer

What is the System.Void type

Until then I thought void was just a keyword to indicate a non-return method, but then I found System.Void on MSDN. Does that change anything?     
asked by 18.02.2015 / 04:21
1
answer

How to create formulas at runtime in C #?

There are many advantages when things change for the better, so were the changes from Clipper to Delphi and C #, in fact just the visual part. There was in Clipper a fantastic feature called MACRO SUBSTITUTION. Well, in Clipper it was possibl...
asked by 19.01.2016 / 23:35
2
answers

How to check if an element exists within a list?

I need to check if there is a state in my list ... I am passing a parameter (a status code) and the method will see in the list if that state exists ... something like this in C #: if (listState.Contains(s.nIDState) == estado) { return tru...
asked by 17.09.2014 / 23:34
2
answers

How to count .xls / .xlsx files in the folder with C #?

I have a FolderBrowserDialog and when I select the folder it shows the files quantity (all, without filter). How do I do this length only with Excel files (.xls, .xlsx). The following is the code below: FolderBrowserDialog fbd = new Fol...
asked by 29.08.2014 / 15:21
1
answer

How to create an application from scratch in ASP.NET MVC?

I'm studying about Asp.Net MVC and here My problem is this: I have this form that is in Jsfiddle and that I have to add this information to a database, ie I would have to get the data - > create one Query to insert and save in...
asked by 17.03.2016 / 01:05