Questions tagged as 'c#'

2
answers

What is the difference between authorizecore and onauthorization

When we create an attribute of type AuthorizeAttribute We have these 2 properties to be overwritten. What's the difference between the two? Both seem to have the same function [Edit] The namespace of the cited attribute is System...
asked by 22.04.2015 / 18:11
2
answers

Find out what the verification digit of a CNPJ

I have a class where I can find out if the CNPJ entered by the user is valid or not. What I would like to do, and what I can not do, is show the user the last two valid digits he should type. For example: MessageBox("CNPJ inválido, o Dig...
asked by 29.04.2015 / 13:14
2
answers

The name 'parameters' does not exist in the current context

I have the following code and it is giving the following error:    The name 'sql' does not exist in the current context The name   'parametros' does not exist in the current context Can anyone help me please? Thanks in advance ... publi...
asked by 15.04.2015 / 19:18
2
answers

Doubt on using in Visual Studio

I create a new project but I can not put those using as in this example below. It appears as in the other code below ... Please help me = / using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtim...
asked by 10.04.2015 / 19:10
1
answer

How to get resolution of an image?

How to get resolution from an image? I have a web application and I need to get this data from an image on localhost.     
asked by 09.04.2015 / 19:17
1
answer

Delete a Specify Row from a DataTable

How can I delete a specified row from a DataTable and then reload a ViewState with the rest of the rows left? I have the following case below, but I am not able to delete directly from DataTable . protected void rdItens_Del...
asked by 25.11.2015 / 14:51
1
answer

Error: Access to bin file \ Debug \

I'm watching some video lessons on Youtube about C # but there is one in question that I can not solve at first. The C # code I'm using is exactly this below: using System; namespace IniciandoProjeto { class Principal {...
asked by 20.11.2015 / 20:39
1
answer

Change color of a given cell

I have a DataGridView that has 8 columns (days of the week) and x rows (times of day). I need to paint only one cell, thus: HowcouldIdothis?Ialreadyhavethefollowingmethods:DateTimediaAgenda=DateTime.Now;DateTimediaInicioAgenda;Date...
asked by 25.11.2015 / 20:36
2
answers

Synchronize items in comboboxes at run time

I've tried for some time to figure out how to synchronize one combobox with another. I am wanting to sync comboboxes at runtime. When the user selects a category in the combobox, depending on their choice, the combobox subcategory will display t...
asked by 17.11.2015 / 23:22
1
answer

Consume DLL C in VB6 or C #

I have a DLL (gbasmsb_library.dll) made available by Popular Pharmacy responsible for returning some functions to interact with this environment. Home I think it's a DLL written in C, I need to consume this DLL in VB6 or C # . In the progr...
asked by 12.02.2015 / 17:20