I'm trying to change assembly binding (from one version to another) dynamically.
I've tried this code but it doesn't work:
Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
ConfigurationSection assemblyBindingSection = config.Sections["assemblyBinding"];
assemblyBindingSec...
I know there are couple 3rd party collection libraries out there (C5, PowerCollections and I guess loads more of other not so complete libraries) as well as the System.Collections.Generics classes. I am however quite unsure which library use to when. I have tried the C5 collections, but some sources claim that they are slower then the de...
We're trying to show 4 trend graphs and will be adding data to them them at a rate of about 1 point every second. In the end each trend needs to show around 600 points.
Currently we are using the graphing tools from Syncfusion but they are unable to redraw the graphs at the speed we require. I believe the issue is due to the fact tha...
I've got an executable file, and I would like to know which versions of the .net framework this file needs to be started.
Is there an easy way to find this information somewhere?
(So far I tried ildasm and dumpbin without any luck)
...
I want to do exactly the same as in this question:
Windows file system is case insensitive. How, given a file/folder name (e.g. "somefile"), I get the actual name of that file/folder (e.g. it should return "SomeFile" if Explorer displays it so)?
But I need to do it in .NET and I want the full path (D:/Temp/Foobar.xml and not just F...
Let's say I have an integer that I need to convert to a string (I might be displaying the value to the user by means of a TextBox, for example.
Should I prefer .ToString() or Convert.ToString(). They both do the same thing (don't they?).
int someValue = 4;
// You can do this
txtSomeValue.Text = someValue.ToString();
// Or this...
txt...
Hi
I need to control (play,rewind,stop) my Video Cam connected to firewire of my PC
Is this possible. My program is written in .NET
Thanks
Anon
...
I am trying to get a MethodInfo object for the method:
Any<TSource>(IEnumerable<TSource>, Func<TSource, Boolean>)
The problem I'm having is working out how you specify the type parameter for the Func bit...
MethodInfo method = typeof(Enumerable).GetMethod("Any", new[] { typeof(Func<what goes here?, Boolean>) });
Help appreciated.
...
I have a new project which simply put, is an attempt to formalize the look and feel of all of our departmental pages. I Googled around and found many tutorials which discussed the pros and cons of several techniques. And from what I've been reading, the thing I'm ooking for is controls. Basically, I want a common header and footer.
<hea...
Is there a way to query or just access newly added object (using ObjectContext.AddObject method) in Entity Framework? I mean situation when it is not yet saved to data store using SaveChanges
I understand that queries are translated to underlying SQL and executed against data store, and it don't have this new object yet. But anyway, I'm...
Hello,
I need to create an application that when a user copies a file into an specific folder, my application will be activated and the file will be changed, also, when the user reads back any file in the folder, changes will also be made to the file.
Is it possible?
I'll use .net for this.
I think the folder C:\WINDOWS\assembly is s...
abstract class Foo
{
private List<Object> container;
private bool update;
Foo Foo()
{
container = new List<object>();
update = false;
}
public abstract Bar CreateBar();
public void BeginUpdate()
{
if (!update)
{
Thread update_thread = new Thread(new ThreadStar...
I am trying to create an expression tree that represents the following:
myObject.childObjectCollection.Any(i => i.Name == "name");
Shortened for clarity, I have the following:
//'myObject.childObjectCollection' is represented here by 'propertyExp'
//'i => i.Name == "name"' is represented here by 'predicateExp'
//but I am struggling w...
Is there a way to change the connection string of a DataBase object in Enterprise Library at runtime? I've found this link but its a little bit outdated (2005)
I've also found this but it seems to apply to .Net in general, I was wondering if there was something that could be done specifically for EntLib.
I was just passing the connecti...
Hi,
how do I retrieve the byte array stored in an integer column in my database?
Do I first case it as int, then as byte[] ?
byte[] permissions = (byte) Convert.ToInt(dr["myField"]);
?
...
I'm looking for an open source C# .NET Financial Functions library. Something that does IRR (Internal Rate of Return) and other common functions that are available in applications like Excel.
Suggestions?
...
I'm trying to use System.IO.File.Replace to update a file, and it's throwing System.IOException if the destination file is on a NAS.
According to MSDN, if the destination file is on a different volume, this method throws an exception. It's right, but how do I detect if two files are on "different volumes"?
Path.GetPathRoot returns diff...
I want to serialize the following Xml structure:
<XmlRootElement>
<Company name="Acme Widgets LLC">
<DbApplication name="ApplicationA" vendor="oracle">
<ConnSpec environment="DEV"
server="DBOraDev1201"
database="AppA"
userId="MyUser"
...
Is there any provable reason why I should always specify the SQL data type for SqlCommand paramenters?
...
I have a huge dictionary of blank values in a variable called current like so:
struct movieuser {blah blah blah}
Dictionary<movieuser, float> questions = new Dictionary<movieuser, float>();
So I am looping through this dictionary and need to fill in the "answers", like so:
for(var k = questions.Keys.GetEnumerator();k.MoveNext(); )
{
...