|
Store a Justin Bieber mp3 without his name on it. That ought to kill whatever virus it is.
Chris Meech
I am Canadian. [heard in a local bar]
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]
|
|
|
|
|
I can stand the virus but not the J.B.
SignatureNotFoundException
|
|
|
|
|
Maybe windows media player?
I suspect it automatically download extra information about your song (in the "\My Music" folders (i.e. Win7 library folders) and rename them like that
Fire WMP and look at the settings?
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.
|
|
|
|
|
I have looked up media player's option and found this:
"Use media information to arrange files in folders on the disk" in "Options > Burn" tab and unchecked it.
Is that what you are talking about?
SignatureNotFoundException
|
|
|
|
|
I think it is "Options > Library > Rename music files using rip music settings". Make sure that is unchecked.
I think computer viruses should count as life. I think it says something about human nature that the only form of life we have created so far is purely destructive. We've created life in our own image.
Stephen Hawking
|
|
|
|
|
Look at the prog below - a collection has one(object)bool in it. And I want to find out if one of them exists in the collection.
Using collection.Contains() would seem like a good idea.
But isn't!
class Program
{
static void Main(string[] args)
{
object arg1 = true;
object arg2 = true;
List<object> collection = new List<object>() { arg1 };
bool first = (collection.Contains(arg1));
bool second = (collection.Contains(arg2));
Console.WriteLine(string.Format("{0} {1}", first, second));
first = false;
second = false;
for (int i = 0; i < collection.Count; i++)
{
if (collection[i] == arg1)
{
first = true;
}
if (collection[i] == arg2)
{
second = true;
}
}
Console.WriteLine(string.Format("{0} {1}", first, second));
Console.ReadKey();
}
}
|
|
|
|
|
What would you expect?
Looks all fine... arg2 is not contained in the collection but collection[0] is equal (not the same but nonetheless equal) to arg2
Seulement, dans certains cas, n'est-ce pas, on n'entend guère que ce qu'on désire entendre et ce qui vous arrange le mieux... [^]
|
|
|
|
|
So you would expect contains(arg2) to return false?
|
|
|
|
|
For sure! your collection is a list of objects and the arg2 object is simply not in that collection...
Seulement, dans certains cas, n'est-ce pas, on n'entend guère que ce qu'on désire entendre et ce qui vous arrange le mieux... [^]
|
|
|
|
|
You're obviously a young player.
Run it!
|
|
|
|
|
Wtf? Goddamn Sh*t!
I would not expect that either.... I am a young player!!
Seulement, dans certains cas, n'est-ce pas, on n'entend guère que ce qu'on désire entendre et ce qui vous arrange le mieux... [^]
|
|
|
|
|
Guirec Le Bars wrote: Wtf? Goddamn Sh*t!
That's almost exactly what I said when I realised what was going on!!!!
This was found in the middle of an MVVM framework that was causing me an issue. Good one, eh?
|
|
|
|
|
Then you're not much elder than me
Seulement, dans certains cas, n'est-ce pas, on n'entend guère que ce qu'on désire entendre et ce qui vous arrange le mieux... [^]
|
|
|
|
|
== resolves to System.Object.ReferenceEquals while contains determines equality by using the default equality comparer, as defined by the object's implementation.
People say nothing is impossible, but I do nothing every day.
|
|
|
|
|
== will resolve to ReferenceEquals for reference types, and if there is no == operator override. For a value type (like bool) it will do a content equality.
|
|
|
|
|
Quite right.
I referred to this specific case which of course wasn't obvious at all.
People say nothing is impossible, but I do nothing every day.
|
|
|
|
|
That's exactly the opposite of what would seem reasonable to me.
|
|
|
|
|
bool is a value type, so it is in the collection, because false == false.
|
|
|
|
|
Not sure what is confusing you, the implementation of Contains obviously uses the Equals object override, so sucessfully finds arg1 and arg2. However, your list is a list of object (rather than a list of bool) so when it comes to using the equality operator instead of Equals, then you're comparing object references (not values!) and clearly arg1 is not arg2.
|
|
|
|
|
I understand the difference and still I make that mistake occasionally. I guess my head isn't screwed on tightly enough.
People say nothing is impossible, but I do nothing every day.
|
|
|
|
|
J4amieC wrote: Not sure what is confusing you,
Seriously? Honestly? you can't see the confusion?
Object1.equals(object2) == true;
When object1 and object2 are different objects that have the same value?
Assuming you didn't know what the objects were, are you telling me you honestly can't see a source of confusion?
|
|
|
|
|
_Maxxx_ wrote: Object1.equals(object2) == true;
When object1 and object2 are different objects that have the same value?
Exactly, the point is I understand valuetype equality semantics from referencetype equality semantics. I agree they're somewhat confusing to new programmers.
|
|
|
|
|
Except object isn't a valuetype
|
|
|
|
|
object is not a value type but the thing you've stored in the object is a value type.
|
|
|
|
|
If you get an email telling you that you can catch Swine Flu from tinned pork then just delete it. It's Spam.
|
|
|
|