Is there an easy way, either through LINQ or Generics, to find out if elements in one List are all available in another List.
I'm currently using Intersect to check this.
For e.g.
List<string> list1; //{ 5, 4, 1, 3, 9, 8, 6, 7, 2, 0 }
List<string> list2; //{ 1, 3, 9 }
list1.Contains(list2) == true
Thanks in advance
...
Hello...
I need a datatable in order to display the data at a WPF datagrid augmented by some generated data.
But i also need to load the data from the database to local C# objects because the classes that represent tha data do many calculations .
So what is better? Depend only at datatable ? Or have the data both in objects and datata...
Hi,
I have created a windows application, which gets a xml file from the URL and save it on my local machine.In this application a Timer control is set for get the updated XML file from the URL and show the update into label. I have created a setup project and Installed it on another system.
Problem is that, The installed application i...
I've wondered about this, so I figure I'll ask it.
Most places you'll see use the same semantic logic for overriding Equals as GetHashCode for memberwise equality...however they usually use different implementations:
public override bool Equals(object obj)
{
if (obj == null || GetType() != obj.GetType())
{
...
I need a component that I can use with C# to convert a word document to an image.
There are a lot of solutions out there to do so, but almost all of them use a virtual printer to do that. I don't want a virtual printer involved because we have to install it on every client that uses our application (over 500 computers) .
I have found Asp...
I'm n00b in IL language. In my task i have to create dynamic types inherited from System.ServiceModel.DomainServices.Client.Entity. When i am adding additional code to set method of property, i receive "operation could destabilize the runtime". Help me, please, resolve that problem.
Code from Reflector:
L_0000: nop
L_0001: ldarg.0
L_...
Hi Guys,
Please can any one advise me if there is an object in .net that can be used to get a list or references to all objects that are currently in scope for an object. For example if the code is currently executing in a method, what objects declared in this method are currently instanciated and alive and what objects that are decla...
Hi,
OpenExeConfiguration has 2 overloads:
ConfigurationManager.OpenExeConfiguration (ConfigurationUserLevel) ----- (1)
ConfigurationManager.OpenExeConfiguration (String) ----- (2)
OpenMappedExeConfiguration has only 1 prototype:
OpenMappedExeConfiguration (ExeConfigurationFileMap fileMap,ConfigurationUserLevel userLevel) ---...
Hello i use this
CultureInfo culture = new CultureInfo("en-US");
culture.DateTimeFormat.DateSeparator = "/";
culture.DateTimeFormat.ShortDatePattern = "dd/MM/yyyy";
//dekadikoi arithmoi
culture.NumberFormat.NumberDecimalSeparator = ".";
Thread.CurrentThread.CurrentCulture = culture;
Thr...
My scenerio is like this:
On the server there is an application which exposes a COM object allowing to interact with this application programaticaly. However I can connect only once through COM due to licence restrictions. So, after initialization a COM object will return me a more specified ConnectionObject.
I need an advice what mana...
Hi,
I'm hacking away at some code which seems to have been started, at least in theory, as an MVVM project in Expression Blend, by my predecessor at this company.
I've got a thread running in the background, which is running some operations on items as they happen. In order to prevent any clashes, I've also got that thread running any ...
Hi,
Developing an application using MVC-style extensionless URL's. One of the pages has a url that sometimes contains an email address. On my local machine this works fine. However when I publish to the test server, trying to access this URL yields a 404 error, unless you take the full stop out, in which case it routes as expected.
I'v...
Hello Guys,
I've been tasked with finding out if it's possible to have a WCF service that can be hooked into by a Windows .Net 1.1 application, as well as newer web applications and one mobile app.
I've done a fair bit of reading on the subject but I've got next to no experience on winforms or the .net framework prior to 2.0.
Any help...
Hi,
At work each three months we have to write reports about past activities. For writing reports we have been given Excel template which contains columns to describe activity, date, time spent for the activity some combo box elements to select predefined location and some formulas.
As it takes a lot of time to rewrite all the details ...
How can I execute direct/raw SQL through subsonic 3.0 when using the Active Record pattern?
...
Hi, all!
Could someone please help me to solve such a task. I need to swap variable values without using any assignment signs. I tried to do it with a while loop but I coudn't store counter value anywhere. Thank you all in advance.
...
Since C# supports threading, is there any way to implement fork concept in C#?
Thanks in advance....
...
Hi expert
Well I have and USB magnetic card reader( MegaWin MA100 USB-UART Controller(V5.10) )
I dont realy how to use it (I tried ones with another magnetic card when I put the card it show an number in textbox area)but with this one nothing is happen when I pass the card it just make a sound but nothing is shown in the textbox area
I l...
There has been a lot of talk of Enums in general violating Clean Code-principles, so I'm looking for people's favorite Enum anti-patterns and alternative solutions for these.
For example I've seen code like this:
switch(enumValue) {
case myEnum.Value1:
// ...
break;
case myEnum.Value2:
// ...
bre...
As the title implies, I want to compare two objects whose type may be diffrent.
For eg,
I expects 'true' for comparing 1000.0(Decimal) with 1000(Double) .
Similary, it should return true if I compare 10(string) and 10(double) .
I tried to compare using Object.Equals() , but it did NOT work.It return false if two objects have different ...