Questions tagged as '.net'

1
answer

Problem with calculation result greater than Int64

I'm doing the exponent of a number and I need the result to come out in a specific format, however I do not know how to do it, it follows the code: double num1 = 290287121823; double num2 = 538783; double resultado = Math.Pow(num1, 2) + num2;...
asked by 01.07.2016 / 14:47
2
answers

How to do a cast of a class typed in C #?

I have the Carro class that inherits from the Objeto class and another CarroTeste class that implements the abstract class TesteBase which implements the ITeste interface, both ( TesteBase and ITeste...
asked by 16.07.2015 / 17:03
2
answers

'Data Access Layer' is the same as 'Data Access Object'?

I've always used DAO (Data Access Object) in Java Web and now that I'm starting for the .NET (C #) platform, I've seen that the Data Access Layer (DAL) layer exists. I was confused, would the DAL be the same as DAO? Because I saw some examples t...
asked by 30.01.2015 / 18:56
1
answer

Fixed Menu in Csharp

I would like to know how to do a fixed menu in C #, as the user moves the application, just change the context, similar to Web pages.     
asked by 03.07.2015 / 04:58
1
answer

(ASP NET MVC4 or 5) How to pass a custom name through XMLHttpRequest?

Personally the question is as follows, I have a <input type="file" id="fileupload"/> and a <input type="text id="Nome"/> field. To pass it to my controller, I do the following: var data = $("#fileupload").get(0).files...
asked by 04.06.2014 / 23:26
2
answers

Is it possible to assign the default value of a property with an attribute?

I'd like to be able to declare a property as: [DefaultValue(10)] public int Maximo { get; set; } And when it was used, it already came with the value started in 10 . However the attribute does not assign the value, when I try to use:...
asked by 23.12.2013 / 03:27
1
answer

What is the scope of the variables in a page with ASP.NET MVC?

I have a view layout : <div> <h1>Pagina Principal<h1> </div> <div> <h3>Simular<h3> </div> <div class="row"> @{Html.RenderPartial("Partials/Teste/Simular", new SimularViewModel(...
asked by 16.11.2018 / 17:35
1
answer

Create instance of classes in threads

Imagine that I have a class: Class Animal { //Propriedades } Now creating multiple instances of the class I do as follows: Animal[] animais = new Animal[10]; for(int i = 0; i < 10; i++) { animais[i] = new Animal(); } So far,...
asked by 02.12.2016 / 11:20
3
answers

Deserialization of JSON

I'm having difficulty deserializing this JSON: string json = "{\"Cidade\":[\"Arrio do Sal\",\"Atl\u00e2ntida\",\"Bom Princ\u00edpio\",\"Brochier\",\"Cachoeirinha\",\"Canaos\",\"Canela\",\"Canoas\",\"Cap\u00e3o da Canoa\",\"Cidreira\",\"Distr...
asked by 16.11.2018 / 17:09
1
answer

Error trying to pass ticket [i] = i;

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace Testes { class Program { static void Main(string[] args) {...
asked by 25.05.2015 / 15:42