Questions tagged as 'c#'

1
answer

Get ArraySegment values

When creating a ArraySegment , I'd like to get the new array created, but when using: meuSegmento.Array; the original array is returned and not the created thread. string[] meuArray = {"stack", "overflow","em", "português"}; var...
asked by 18.02.2016 / 12:59
1
answer

asp.net MVC Inheritance between Models

I'm trying to implement a person's registry where I have inheritances for both individuals and businesses, but my save method is not getting the person's type properly. Following sample code [HttpPost] [ValidateAntiForgeryToken] public asyn...
asked by 26.02.2016 / 15:16
1
answer

Excel file reading

I'm trying to use C # to read an Excel file, but every time I run the code the last column is not stored Reading Code: //Cria conexão com a planilha OleDbConnection conexao = new OleDbConnection(@"Provider=Microsoft.ACE.OL...
asked by 07.01.2016 / 21:06
1
answer

Create buttons at run time

I want to create a small web game where the user will make the decision of the characters at runtime. At the moment I have the following screen: Whentheuserclicksontheleftbutton,forexample,Iwouldliketocreatealabelbelowtheleftbutton,alongwith2bu...
asked by 05.01.2016 / 04:09
1
answer

Batch upload Asp.net MVC5

I'mtryingtodevelopawebsystemthatworksasamessaging-orientedsocialnetwork.Havingtheclassesusuario.csandInformacao.cs(whichworksasamessage),Ineedtomakeattachmentsavailableinthisinformation,messagesarepostedoneachuserpage,suchaspagesofablog.Auserca...
asked by 07.01.2016 / 17:38
1
answer

Dependency Injection MVC C # - MongoDB 2.0

I'm starting a project using MVC 4 with Driver 2.0 MongoDB . I'm used to using Ninject with EF6 and would like to know if there is something like MongoDB or some example architecture pattern to implement it....
asked by 13.01.2016 / 18:37
1
answer

Creating Models that derive IdentityUser or use the AspNetUsers table

I am developing management software for my fitness club. I have students, teachers and system users. I installed identity. I created a model named Aluno that inherits from IdentityUser public class Aluno : IdentityUs...
asked by 31.08.2016 / 18:10
1
answer

How to set a byte array size dynamically?

I'm developing an application that creates a arquivo.txt and saves it to a column of my table in the database. The problem is in querying this file. What happens, when I want to make the query I have to have an array of bytes with size...
asked by 26.08.2016 / 16:15
1
answer

Passing DataTime javascript to ASP.NET MVC Controller by Ajax

I'm having trouble passing javascript date to the Controller via ajax .. Model: public class ModelA{ .... [Required] DataType(DataType.Date)] DisplayFormat(DataFormatString = "{0:dd/MM/yyyy}")] Display(Name = "Data de Nascime...
asked by 31.08.2016 / 20:18
1
answer

Robot to perform web procedures similar to PhantomJS

Is there any framework or form of implementation to navigate a website programmatically through C # code? I studied the phantomJS and Selenium frameworks, but they have some limitations regarding dynamic navigation, such as addi...
asked by 01.12.2015 / 19:07