Questions tagged as '.net'

1
answer

Why does calling a simple method in a class give a reference error?

I'm starting to study C # and I get the following error:    CODE: CS0120 DESCRIPTION: An object reference is required for   the non-static field, method, or property   'Program.SomarNumeroes (int, int)' CODE: CS0120 DESCRIPTION:   An objec...
asked by 24.08.2016 / 21:16
1
answer

Can you have some error in foreach execution in this method?

Can I run the following code in error? protected void ImprimeValores(Ilist<int> values) { if (values.Count > 0 && values != null) { foreach(int v in values) Console.WriteLine(string.Con...
asked by 22.05.2016 / 20:14
1
answer

NullReferenceException when calling function

I'm creating some unit tests for a class library that does manipulations in a database. The method being tested is this: public object ExecuteNoQueryOperation ( string spOrSqlInstructions, CommandType commandType = CommandType.StoredProcedu...
asked by 04.06.2016 / 20:01
1
answer

What is the advantage of using Tag Helpers in ASP.Net Core?

I'm studying ASP.NET Core and came across the tag helpers when I generated the scaffold of a view . I found the new syntax interesting, the code is more readable on some points, however, adding another DLL to all views that used tag help...
asked by 30.12.2015 / 13:25
1
answer

Develop for x86 and x64 platforms

Increasingly, operating systems are prioritizing the "%" version of%, so the development of applications for this architecture is increasingly attractive. Based on this scenario, I ask you what are the advantages / disadvantages of developin...
asked by 07.01.2016 / 13:51
1
answer

What is a class of type "class MyClassExampleT where T: new () {}"?

Is a class ExemploClass<T> class a list? See the example class below: public abstract class MinhaClasseExemplo<T> where T: new() { public T value {get; set;} } What does each part of this expression mean: abstract class M...
asked by 04.01.2016 / 02:12
1
answer

Simple permutation algorithm

I'm trying to create a simple permutation algorithm where you pass any number eg 123 and it should return the largest number without repeating. I tried something of this type more when I step 4242 it does not return me 4422 but 4242 as larger....
asked by 31.01.2016 / 00:22
1
answer

MVC Helper with Generic List

I'm creating a Helper in my Asp.Net MVC 5 project, and I'd like to get a generic list as a parameter, but the following code snippet does not work: @helper MeuHelper(string param1, int param2, List<T> param3) { // Sequência de código...
asked by 28.12.2016 / 20:28
2
answers

How to manipulate properties of instances of a class that is in a ListT?

I have a class called Pessoa , this class has two properties Nome and Idade , I'm using List<T> to manipulate data, I know I can manipulate data of type string or int creating a List<string>...
asked by 21.11.2015 / 03:31
3
answers

Generate PDF with Asp.Net MVC

Hello, in my application the reports are generated in Html, I would like to know a way to generate these Html reports in PDF.     
asked by 08.10.2015 / 21:19