Sorted dictionary
How to sort SortedDictionary that has points as Keys?I want to sort SortedDictionary<Point, int> myDict = new SortedDictionary<Point, int>();I fill myDict with Points and ints, and then i...
View ArticleWhy divide the first number by the smaller of the two numbers is zero, the...
Hi!Sorry for my poor English!when divide two number in c# if first number smaller from second number , result=0.int/int=intwhy?This problem did not when i write code in vb6 .If I want to linq the...
View ArticleConvert Array of strings to Array of Bytes
HelloI have an array of strings As an examplestring[] strArray = new string[1000] ;strArray[0] = "String 1"; ...... strArray[999] = "String 999";Now, lets say I need to convert that array into an...
View ArticleVS2012 Lightswitch Applications Compile However Show Blank Screens
I can compile my Lightswitch applications but when I debug them they show a blank screen. I'm seeing version conflicts in the output window and messages like:The thread '<No Name>' (0x110c) has...
View ArticleEntity Framework change schema at runtime for deployment
Hi All,I´m developing using C# VS 2012 and EF 4.1. My application runs fine except for deployment. As every customer has a differente database schema name, I need to recompile my code for every...
View ArticleEvent-Receiving 2nd Thread like GUI-less Form?
My standard architecture for controlling robots is this:1) Main GUI (Form) : Primary Thread2) Data Model Class that keeps the data3) State-Machine Controller that sends commands to robot when directed...
View ArticleUnity Dependency Resolution clarification
I have an MVC 4 application that I have configured to use Unity for dependency resolution. Because I like to know when things fail, I created a LogDecorator that sits around unity, and catches any type...
View ArticleValue cannot be null. Parameter name: type at...
Hi,I am trying load an assembly using following code and I am getting this error: Value cannot be null. Parameter name: type at System.Activator.CreateInstance(Type type, Boolean nonPublic)Assembly a =...
View ArticleI have two XML documents, identical in structure. If a element value in A is...
Hi,I have two XML documents, identical in structure. If a element value in A is different than B, then it needs to be copied to B (or a copy of B).The solution can be using either xmlDocument or...
View ArticleUsing a JavaScript Array as a Table valued Parameter for SQL Server Stored...
I have a simple but of JavaScript that creates two 'person' objects. These person objects have two properties: FirstName and LastName. I have a table in my SQL Server database with the same columns...
View ArticleC# Coding help
I am a novice when it comes to programming, but do have a slight understanding of how. I read a lot of C# books and patterns books, and I am stumped on how to perform something. So basically what I am...
View ArticleThird web request takes about 20 seconds
string post_data = "test=test" + s; string uri = "http://statigr.am/controller_ajax.php"; HttpWebRequest request = (HttpWebRequest) WebRequest.Create(uri); request.KeepAlive = false;...
View ArticleKeep stuck at the reading the data from database
I would like to minus the data from the database with the value that I give when I run the program. Everything works, but I keep stuck at the newVal. I already did it like this, but the newVal keep...
View ArticleGet and use MainWindowHandle for a hidden or minimized window
I want to get and use the MainWindowHandle of a hidden or minimized window so I can take a snapshot of it. I do not want to make the window visible in that process. The window could be any window on...
View ArticleI have problem with WebRequest. it responses another page !
hi ; I am trying to get the html code of this page :http://groups.yahoo.com/neo/groups/KohanDiar/infobut it responses this page : http://groups.yahoo.com/neothis is my code : WebRequest request =...
View Articleabout rijndael algorithm
I'm using the key and IV values as followings byte[] key =null;byte[] IV = null;UTF8Encoding encoding = new UTF8Encoding(); key = encoding.GetBytes("b4e412a4-0cb7-49e5-a6b0-51e67f3b66b2"); IV =...
View ArticleHow to calculate sentiment score of content faster in c#
hello , i am making application that generate sentiment score table of a given table with a desired selected content, but i am facing problem that it is too slow and taking days for large tables...
View Articleexplain the primeNumer code logic line by line comment?
staticvoidMain(string[] args){ intnum, i = 3, count, c; Console.WriteLine("Enter the number of prime numbers you want"); num=...
View ArticleSOAP Web Service 'System.ServiceModel.XmlSerializerFormatAttribute' does not...
For an Windows Phone 8 Application, I need to connect to a SOAP Web Service. But when I use the Visual tool to add the service reference, it adds a file "Reference.cs" with an error...
View ArticleRepairs window avoid while opening excel from Interop using C#
Hi ,I am using Interop to read excel file and I am getting this window when I read data. I have used this code also to avoid alerts xlApp.DisplayAlerts = false;...
View Article