Questions tagged as 'c#'

1
answer

Print whenever variable receives a certain value

I'm developing a simple game where whenever an object exits the screen a variable named score gets +1. The idea is simple, what I'm trying to do is to print the value of the variable variable whenever the player makes 10 new points, that is,...
asked by 31.08.2018 / 18:45
1
answer

Redirect ActionResult

Good to all. I'm trying to redirect from one Actionresult to another and have tried everything ever without success. At this point I find the following code: [AllowAnonymous] public ActionResult Index_GA_ER(string tkn)...
asked by 18.07.2018 / 12:06
1
answer

What is the default value of a primitive type variable in C #?

When a primitive type variable is created but not initialized, its value is null ? Example: public int x; If I do nothing with x, ie do not assign a value to it, it will null ?     
asked by 04.05.2018 / 22:45
1
answer

Bring forward an already open program - C #

I have a program that, when trying to run, is already open, it sends a message that it is already running, but I wanted to know a way to bring the program forward when I try to open it. Code: class InicializaPrograma { stati...
asked by 03.05.2018 / 20:14
1
answer

Asp.net MVC is it better to work with Areas or with Projects within a Solution? [closed]

I'm creating a portal and separating modules by Areas. But the demands are increasing a lot, there are at least 5 more modules to be written on the portal. What is the best way forward in terms of performace and organization? Continue in t...
asked by 17.05.2018 / 14:25
3
answers

How to concatenate sublists from a list and add values to them using Linq with C #

Hello, I have the following 2 classes: public class EstoqueItem { [Key] public int Id { get; set; } public decimal Qtd { get; set; } public Estoque Estoque { get; set;} } public class Estoque { [Key] public int Id {...
asked by 14.09.2018 / 15:30
1
answer

Example of run-time object in C #

Reading an article appeared the following term runtime object or "runtime object". What would that object be? Would it be an instance of a class? Can anyone pass some example? Part of the article:    The OO design process centers on use...
asked by 29.04.2018 / 05:22
2
answers

C # EFD-REINF 1.03.02 - Event signature invalid. Digital signature of XML document is invalid

All good? I'm trying to make the EFD-REINF digital signature shell (the most recent version 1.03.02 ) of the event XML in this case I'm testing with the R1000) with .Net C # , but framework 4.0 . I do not really know if I'm doing so...
asked by 30.04.2018 / 18:02
1
answer

NullReferenceException in Winforms code

Ithinkit'sabugnotinthecode,butinthecompiler...WhenIeatthiscodearea,theerroralwaysgoestothenextvariable,ormethod.See: Partofthecode:grpBoxMDeck[i]=newSystem.Windows.Forms.GroupBox(){Location=newSystem.Drawing.Point(76,yG),Size=newSystem.Drawing....
asked by 29.04.2018 / 22:35
1
answer

Unrecognized element (File download)

I'm trying to make a code to download the file to a folder and it returns me this error Unrecognized element. Code: string pasta = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86) + @"\teste\"; download = new WebClient()...
asked by 31.05.2018 / 19:58