A class that contains itself as an element Can a class be defined which contains itself as an element?  I know its forbidden for a set to contain itself, and I have seen arguments that  suggest it's possible for a class to do so but none of them go right out and say that it is possible.
The answer may vary from set theory to set theory, so I'm also interested in any cases where the set theories may differ on such a construction.
Edit: From the comments, if classes cannot contain themselves, a related question would be whether a set theory can admit something which corresponds to the English natural-language phrase, "something which contains itself," even if the set theory supports classes.
 A: In the most commonly used frameworks for set theory (ZFC or NBG), classes are certain collections of sets.  In particular, every element of a class is a set, so a proper class cannot be an element of any class (including itself).
However, it is perfectly reasonable to allow sets that are elements of themselves.  One of the axioms of ZFC (the axiom of Foundation) forbids this, but if you drop that axiom, you get a perfectly usable set theory.  For instance, it is consistent with ZFC-Foundation for there to exist a set $x$ such that $x=\{x\}$, or indeed for there to exist many distinct such sets.
The reason that you normally don't allow such sets (and include the axiom of Foundation) is that you can't really say anything about them without adding new axioms.  With the axiom of Foundation, you can prove that all sets are built up from the empty set by an inductive process (using transfinite induction).  Without it, there might be some other sets which are not built up inductively, and you don't know where they came from or how to classify them all.  You can add additional axioms which restrict what such other sets exist (or guarantee that such sets do exist), but these axioms aren't really especially intuitively natural.  And all of this is a big mess to be introducing just to allow some weird sets that you never (or almost never) have to use to do any other math.  Still, it can be interesting to study what you can say about these weird sets for its own sake.  This Wikipedia page gives a brief overview of some of the ideas that come up when you do so.
A: Universal set
We don't even need to talk about "containing itself" to get beyond the capability of ZF or related set theories. Consider the natural-language noun "everything", and note that it cannot correspond to a set in ZF, nor a class in NBG, due to some appropriate version of Russell's paradox. Indeed, such a collection cannot exist even if we drop the axiom of foundation in ZF, which would prevent any set from containing itself and hence would forbid the set of all sets as it would contain itself.
However, there is nothing intrinsically wrong with the natural-language concept of "everything", despite it not having any corresponding notion in the usual set theories (and most type theories as well). Contrary to what many mathematicians believe, Cantor's paradox and Russell's paradox as manifested in ZF do not at all imply that our intuitive mental concept of "everything" is faulty! To see why it is not faulty, simply note that there is an alternative set theory called NFU invented by Quine.
In NFU one can construct the set of everything, namely $U = \{ x : x = x \}$, and yet it avoids the paradoxes despite having $U \in U$. How can we be sure it avoids the paradoxes? Well, it has been proven that if PA is consistent then NFU is consistent too. So anyone who accepts PA (which of course includes everyone who accepts ZF) must accept that NFU is consistent! If we add to NFU axioms corresponding to Infinity and Axiom of Choice, then the resulting set theory is still much weaker than ZFC.
Furthermore, by having the universal set, all the sets in NFU form a boolean lattice, and so our intuitive understanding of venn diagrams work perfectly in NFU. In contrast venn diagrams are incompatible with ZF unless you only depict relative complements. Of course, NFU has its own disadvantages, which are off-putting to many people familiar with ZFC.
In any case the point is that what is allowed in natural language is just impossible in any extension of ZF, and the key obstruction is not about sets containing themselves but about the existence of the universal set.
Universal acceptor
Another viewpoint with a computer science flavour is that any collection corresponds to a decider that either accepts or rejects any input. Then the universal set is simply the decider that accepts everything. In the world of programs in a Turing-complete programming language where every string is interpreted as a program, such a universal acceptor $U$ trivially exists, and (when run) accepts every string including itself. Like in NFU, where the power-set of the universe is strictly smaller, here too we have the curious property that there is no bijection between the collection of programs $U$ and the collection of deciders (which corresponds to subsets of $U$), which is proven via a simple diagonalization argument in exactly the same way... (The only difference is that this world does not support classical logic, though it can still function as a intuitionistic logic system via the Brouwer-Heyting-Kolmogorov interpretation.)
Empty tuple
Another way one can naturally get the concept of a collection containing itself, that has nothing to do with a universal set, is an interesting way of defining (finite) tuples. In normal set theories the intended structure has a single sort, namely the sort of sets. We could instead have two sorts, one for sets, and the other for tuples, and use axioms to define the tuple construction, concatenation, projection and length. Furthermore, we can stipulate that if $S,T$ are sets then the tuple $\langle S , T \rangle$ is in fact the set of all tuples with first item in $S$ and second item in $T$. Similarly for tuples of other lengths.
And generalizing to arbitrary length, we would stipulate that if a tuple $T$ has length $k$ and the $i$-th item of $T$, denoted by $T[i]$, is a set, then $T$ itself is the set of all tuples $t$ of length $k$ such that $t[i]$ is in $T[i]$. The inevitable conclusion is that the empty tuple $\langle \rangle$, which is the unique tuple of length $0$, contains itself as its unique member! As a result we also get that $\langle \langle \rangle \rangle$ has the same property.
Note that this would be incompatible with the axiom of foundation in ZF, but it is a very natural viewpoint and certainly compatible with any structure where every object has a finite description, since tuples can be added by using a suitable encoding.
