There is actually a (subtle) difference between the two. Imagine you have the following code in File1.cs:
// File1.cs
using System;
namespace Outer.Inner
{
class Foo
{
static void Bar()
{
double d = Math.PI;
}
}
}
Now imagine that someone adds another file (File2.cs) to the project that looks like this:
// File2.cs
namespace Outer
{
class Math
{
}
}
The compiler searches Outer
before looking at those using
directives outside the namespace, so it finds Outer.Math
instead of System.Math
. Unfortunately (or perhaps fortunately?), Outer.Math
has no PI
member, so File1 is now broken.
This changes if you put the using
inside your namespace declaration, as follows:
// File1b.cs
namespace Outer.Inner
{
using System;
class Foo
{
static void Bar()
{
double d = Math.PI;
}
}
}
Now the compiler searches System
before searching Outer
, finds System.Math
, and all is well.
Some would argue that Math
might be a bad name for a user-defined class, since there's already one in System
; the point here is just that there is a difference, and it affects the maintainability of your code.
It's also interesting to note what happens if Foo
is in namespace Outer
, rather than Outer.Inner
. In that case, adding Outer.Math
in File2 breaks File1 regardless of where the using
goes. This implies that the compiler searches the innermost enclosing namespace before it looks at any using
directive.
Best Answer
In order to use Amazon Marketplace Webservices (MWS) you will need a Pro Merchant seller account, an Amazon WebStore account, a Checkout by Amazon account, or an Amazon Product Ads account. The Pro Merchant or Professional Sellers account is currently priced at £25.00 or $39.99 USD per month. Then sign up for MWS by clicking the Sign up for MWS button at http://developer.amazonservices.co.uk/ (or appropriate for your region).
It is my understanding that by calling Amazon Seller Service you can get a "sandboxed" MWS account, although I've never used that.
Once that's set up, you have two options:
Once that's done, you use the following API calls:
If done right, using above APIs can completely automate the process of creating new products on Amazon, linking your data to existing products (by linking to the same ASINs, EANs, UPCs or ISBNs) as well as changing images, prices and inventory.
The Amazon Developer site has C# sample client code for you to play with. Other useful references: