views:

88

answers:

3

I got System.Collections.Generic.List<T> source code from mscorlib.dll using .NET reflector.

I implemented INotifyCollectionChanged and INotifyPropertyChanged interfaces, renamed the class and builded it.

Did I violate copyright?

I not using MS source code release with Microsoft Reference License (MS-RL). What about the code deassembled from MSIL?

In fact, List<T> is not patented by MS, generic collections are not invited by MS/

+3  A: 

Couldn't you just use BindingList instead?

Marijn
-1: Irrelevant to the question.
Timwi
+1 to counter unfair downvote. Even though it doesn't directly answer the question, it is a much better approach than trying write a modified version of List<T>...
Thomas Levesque
I was using observable collection but there was a problem with serialization if events has assigned eventhandlers. And also I needed to 'turn of notifications' sometimes. for examle i needed to do many changes to the collection in a loop an updating UI (databinding) would be performance expensive.
Liero
And also I had many times used in my code List<T>.Exists() or AddRange and the goal was to change the BL logic as least as possible
Liero
@Thomas: What do you mean by “unfair downvote”? You’re not supposed to vote what you like, you’re supposed to vote *what answers the question correctly*...
Timwi
@Thomas see if you think that way when *you* ask a question and instead of giving you answers people "refute" your question...
romkyns
@Thomas: I see your point in that my answer doesn't really answer the question and I appreciate the feedback.
Marijn
+1  A: 

You violate copyright if you distribute your modified List<T> in any software product.

The reference sources are provided for reference use. From the license:

"Reference use" means use of the software within your company as a reference, in read only form, for the sole purposes of debugging your products, maintaining your products, or enhancing the interoperability of your products with the software, and specifically excludes the right to distribute the software outside of your company.

Even if you use the code generated by Reflector instead of the Microsoft Reference Source, you will run afoul of copyright. The Reflector output is based on the IL, which is copyrighted by Microsoft, so your code will count as a derivative of Microsoft’s copyrighted work.

Notice that copyright is completely different from patents.

Timwi
I agree with your conclusion. However, he's not using the reference source. He's using source disassembled from the IL.
Matthew Flaschen
@Matthew: Sorry, you’re right. Added a paragraph about that.
Timwi
*"You cannot violate a patent by copying source code, unless the original source code already violates a patent."* Not true: for example, if MS owned a patent (or a patent license) for IP used within `List<T>` then they're not violating that patent. If you copy their code then you are violating that patent (unless you happen to own a patent license too).
LukeH
@LukeH: Fair enough — sentence removed.
Timwi
+1  A: 

You need to take at least 3 things into consideration: copyright, licence, and patents, and they are all different.

Copyright is the right to copy software (or other copyrightable intellectual property). You don't own the copyright to the .NET binaries, but have been granted a licence to download and install them by their copyright holder, Microsoft. If you haven't agreed to the licence, your install is illegal. Then you are reverese-engineering a part of the binaries; this is probably against the terms of the licence (most closed-source software licences forbid reverse engineering). Finally, patents. A patent can protect an algorithm, and if this applies, it doesn't matter who wrote the implementation or whether you came up with it yourself or not: If it's patented, you can't use it without the patent holder's permission.

So what you need to check is:

  1. Does the licence allow reverse-engineering, and then adapting and redistributing the resulting code, and if so, under what conditions?
  2. Do any patents apply to any part of the code you're generating and writing?

My guess would be that what you're doing is completely off limits at least for the licence part.

tdammers