C# is a multi-paradigm programming language encompassing strong typing, imperative, declarative, functional, generic, object-oriented (class-based), and component-oriented programming disciplines.

learn more… | top users | synonyms (4) | c# jobs

0
votes
0answers
4 views

A Generic Error Occured in GDI+ when resizing image

Ok, I am creating a photobooth application, and it's working. I'm creating an image from a base64 string which I'm getting from a webcam Jquery plugin, then converting it to an Image using an ...
0
votes
1answer
6 views

Bitmap error when converting it

I'm using EmguCV to create a Histogram, to do this I need a Bitmap to create an Image<Gray, Byte>. When I load an image from a file to a Bitmap variable like this: Bitmap bmpImg = new ...
0
votes
0answers
5 views

XMLSerialization sometimes doesn't set properties on de-serialization

I have a weird behavior, which I don't even know how to diagnose. Some properties during de-serialization are not set (null), even though I clearly see them in the (just-produced) XML document. The ...
0
votes
0answers
4 views

DataGrid Width has no affect in Windows Mobile Psion Omnii Xt15

this is the code I am using to set up the column styles... but it only works on windows CE5 but when i use it on the latest Mobile Psion Omnii Xt15 then the widths are ignored, and only display with ...
0
votes
0answers
4 views

Open Youtube video using HtmlAgilityPack and MyToolkit for Windows Phone

Gotta catch that youtube video that contains this page and open it in a MediaElement or WebBrowser either one is sufficient. I know I need to use the HtmlAgilityPack to get the url of the video and ...
0
votes
2answers
19 views

Looking for a tag in a txt doc

So I am trying to take a txt doc with about 500 lines in it and look for tags. The tags are one letter at the start of the line. I am then trying to get it to take the lins with that tag and put it in ...
-1
votes
1answer
11 views

How do I combine text and MessageBoxIcon?

I want to combine a ComboBox's value and a MessageBoxIcon. I want it (basically) to do this: MessageBox.Show("Text", "Text", MessageBoxButtons.OK, MessageBoxIcon.ComboBox.Value.ToString()); Is this ...
0
votes
0answers
19 views

Cannot load DLL or one of its dependencies

On my dev machine everything works fine. On my test machine I can't run my .exe because it says "Lib.dll or one of its dependencies was not found". However Lib.dll is in the same directory as the .exe ...
0
votes
0answers
4 views

C# MDI Child Form control handle into array

I'm working on a web automation project in which I have a series of dynamically created MDI Children with a web-browser embedded. From the MDI Parent form, the user can control various aspects of ...
0
votes
0answers
10 views

IDictonary<string,object> object has multiple objects, how to seperate?

I'm currently about to develop a website with asp.net mvc4 and mongodb as database. To get authentication compatible with the membership provider, I use the ExtendedMongoMembership NuGet Package. ...
0
votes
1answer
7 views

Reference a user control by name in code behind (dynamically created)

I created a checkbox using the method below: for( i = 1; i<7; i++) { for (j = 1; j < 33; j++) { CheckBox a = new CheckBox(); a.Name = "SAT_ID_" + ...
0
votes
0answers
3 views

Using client-customized resources (resx) as well as default resources

I'm trying to find info on how best to allow localization and client-customization of resource files. It will be simple to give a demo, but first what I am doing: We have an app that is a product, ...
0
votes
1answer
15 views

Data not displaying in DataGridView

This is an extension of a question that I had asked before. I am trying to execute an SQL Query and display the results in a DataGridView, but even though I am assigning the datasource to the query ...
0
votes
1answer
14 views

ASP NET Code First Existing database - no reverse engineering

I created a new database by Code First and enabled migrations in order to update the database, but the database came under some modifications and I would like to update my models using the Reverse ...
1
vote
0answers
4 views

Key not valid Error in One Project But Works In Different Project From Same Solution

I have a C# solution that uses System.Security to decrypt the password to a TFS server. The security routines are kept in a separate project within the solution. There are two other projects in the ...
0
votes
0answers
4 views

Automapper map custom collection

Hi im having difficulties mapping a custom pagedlist collection i have created. I have a pagedList interface like this: public interface IPagedList<T> : IList<T> And the ...
2
votes
1answer
28 views

What can cause dictionary.ContainsKey(dictionary.Keys.First()) to return false?

dictionary.Keys.First().GetHashCode() == dictionary.Keys.First().GetHashCode() returns true dictionary.Keys.First() == dictionary.Keys.First() returns true What's missing? Why can't the dictionary ...
0
votes
0answers
4 views

How to get html from an element in WebKit.Net

I'm migrating an old project to WebKit.NET 0.5 Cairo. Most roadblocks I've gotten past but I can't figure out how to get the HTML for an individual WebKit.DOM.Element object. I can read the HTML of ...
1
vote
0answers
9 views

How do I unit test this custom commandlet

I am unable to figure out how to unit test if this commandlet will fail, if no arguments are provided to it. [Cmdlet(VerbsCommon.Move, "SomeResource")] public class MoveSomeResource : Cmdlet { ...
0
votes
0answers
20 views

Issues with Logical Operators and exceptions

This is something that left me scratching my head till I figured it out. Referrences: What is the difference bettween Bitwise AND & and LOGICAL AND && and here: What is the difference ...
0
votes
0answers
3 views

how to set up production credentials on behalf of third party

we need some help in understanding how to set up the production side of the integration. I suspect that we may not be able to set this up in the way we had initially anticipated (although i am certain ...
0
votes
2answers
9 views

Lines not drawing to picture box every time

When my code runs only about 1/3 of the time it will actually draw properly, the rest it will just not draw some of the lines. Pen pen = new Pen(Color.Black); Graphics graphics = ...
1
vote
2answers
26 views

Make a c# application that runs continuously

I am writing a client side app that pushes data from users computers up to a website. I want this application to update the website every 60ish seconds. Right now I have my function wrapped in an ...
0
votes
2answers
33 views

DLLImport path C#

I would like to import my DLL inside my C# class but instead of this: [DllImport(@"C:\Users\user\Documents\Visual Studio 2010\Projects\KeyDll\Debug\DLLWrap.dll", CallingConvention = ...
0
votes
1answer
10 views

Create MVC querystring from a List

Is it possible to, in code, to generate a querystring that will be binded to a controller variable like this MyController(List<long?> queryList) { //I want the queryList to be bound using the ...
0
votes
1answer
45 views

LINQ query structure with if statement?

I have a full LINQ query built out. I need one query run if the user is a manager/team lead and a separate query run if they are not. However the queries are very similar. Manager/Teamleads get to ...
0
votes
0answers
13 views

Quickbook online service gives 500 internal server?

I am trying to call the data service but got 500 error every time. When I tested using "Try it" button in the API Explorer, it worked. The response came back fine. But in my app, it failed to connect. ...
0
votes
0answers
12 views

How to verify a certificate in fiddler core?

I want to verify the certificate issued by the server to be valid and alert the user to choose if it cannot be verified. Presently it seems all certificates are accepted by fiddler without alerting ...
1
vote
1answer
39 views

SelectMany makes too many queries

I have dynamic fields inside usergroups and I want to select them based on what usergroups user is. Basically I want to simulate query like .Where(x => x.UserGroupId == x || ... because otherwise ...
0
votes
0answers
13 views

Drop Down List in Update Panel causes Invalid postback or callback argument when div is set to not visible on page load

I have a drop down list in Update Panel causes Invalid postback or callback argument error when I hide the div using: myDiv.Visible = false; on PageLoad. It is set to visible during a Postback. ...
0
votes
0answers
16 views

Can you get the DbContext from a DbSet?

In my application it is sometimes necessary to save 10,000 or more rows to the database in one operation. I've found that simply iterating and adding each item one at a time can take upwards of half ...
0
votes
1answer
14 views

Difference between XNA, DirectX and Monogame, SharpDX

I have been learning C# for a time now. I basically come from a non-developing background (means I dont know the actual working of different programming tools). I just started learning Monogame but ...
0
votes
1answer
16 views

Wrong data got back from deserializing an object with custom type cast operator

I have a class designed to perform like an UInt16. So instead of doing: UInt16 myProp, I can use Address myProp, which is more descriptive. Here's a snippet: public class Address { public ...
0
votes
3answers
46 views

Parse very long date format to DateTime in C#

How would I parse the following string date to a DateTime object in C#: "Thursday, 1st January 1970" This is coming from an XML feed and DateTime.Parse doesnt seem to like it in en-GB locale. The ...
1
vote
1answer
25 views

Organizing actions into controllers

Alright... I need to list all uploads, downloads and requests made. But also I need to list all uploads, downloads and requests specific for a user. I'm not sure about where to place those actions in ...
1
vote
1answer
18 views

SqlBulkCopy not copying any data

Here's the schema for TABLE1: CREATE TABLE [dbo].[TABLE1] ( [id] [int] IDENTITY(1, 1) NOT NULL, [code] [int] NOT NULL, [description] [varchar](256) NOT NULL, [value] [numeric](18,2) ...
0
votes
1answer
13 views

Connect other process gui

Is there a way to get access over other process (for example windows calculator) and retrieve information that can help perform GUI operations (emulate 1 + 1 = .. operations)?What api should be used? ...
0
votes
1answer
13 views

Label won't align properly in Windows XP

When running the program in Windows Vista, 7 or 8, it'll work just fine, but if I run the program then it'll be tabbed in and look bad. I've tried finding out why it does this, but I can seem to ...
0
votes
3answers
28 views

How change variable value depending on architecture

Title is clear: how can I change a value in C# depending on destination architecture? In particular, I want to change a string depending on x86 or x64. Many Thanks! Edit: I need to check if an x64 ...
0
votes
4answers
76 views

c#…my while loop keep repeating

i am trying to get my while loop to ONLY keep repeating till all subjects have been answered, then it should stop and display the bonus and final score. but don't know why its not doing that? help ...
0
votes
1answer
7 views

Microsoft Excel Application entry missing in DCOMCNFG

Entry for "Microsoft Excel Application" is not there in DCOMCNFG (tried in both 32 and 64 bits). How can I make it shows up there? Any suggestion?
0
votes
5answers
36 views

C# Split array into fixed number of ranges

I have a byte[] array say of any length and i want to split it into parts and each part would have a length of 2205 and i would have to do operations on those 2205 bytes, here is my algorithm: // ...
0
votes
1answer
16 views

C# MVC Razor namespace Microsoft.VisualBasic.Financial not resolving

I am using MVC 3 Razor .cshtml pages. I have included the Microsoft.VisualBasic reference into my project and use it just fine in existing web forms pages. But within my view it will not resolve the ...
3
votes
1answer
32 views

make certain node invisible

My problem is that I want to be able to set certain nodes invisible. I've got two forms. The second one is filled witch checkboxes named same as nodes in first form. After checking one of checkboxes I ...
0
votes
0answers
13 views

ReportViewer cutting off top of report when zoomed

We have a report running out of SQL Server REporting Services that works fine. When zoomed to 150% it looks correct. (Seen here http://i.imgur.com/pEEBJyx.png) I built a asp.net page to display the ...
1
vote
0answers
30 views

Should I be using a Generic Repository with Entity Framework 5?

I'm currently using Entity Framework with a Generic Repository and Unit Of Work Pattern. My Model is similar to the one described in this article I've used Generic Repositories in the past and really ...
-2
votes
1answer
16 views

looking for something like dotfuscator with Specific options

I want to protect my dll file that written whith C# dot net.i have founded it is possible to seen source code of my dll. i know Methods of protection a dot net file but i want to change variables- ...
0
votes
1answer
26 views

BackgroundWorker calling Directory.EnumerateFiles completes before enumeration finishes

A trivial issue it seems. I have the following code snippet. It seems that the completed event fires before EnumerateFiles actually finishes. For example, if the tb_source.Text ... which is a path ...
0
votes
0answers
18 views

WCF - Unable to return data from Data contract and work with received data

I am new to WCF and have a service that I now need to work with the data received as well as return data from the contract. I cannot find any samples that work with this particular model. Here is ...
0
votes
2answers
70 views

how do you pull XML data from a C# file

If I have XML data in a C# file, instead of using setXMLUrl(/blah.blah.xml); to retrieve the XML information from an XML file, what function or code do I need to pull XML data from a C# file that is ...

1 2 3 4 5 9760