Another way to say "New York City is part of New York state" is "New York State has a city called New York City."