Let $R$ be a Noetherian ring, $I$ be an ideal of $R$ and $M$ be a $ZD$-module. Let $S$ be a Serre subcategory of the category of $R$-modules satisfying the condition $C_I$, and $I$ contain a maximal $S$-sequence on $M$. We show that all maximal $S$-sequences on $M$ in $I$, have the same length. If this common length is denoted by $S-\depth(I, M)$, then $S-\depth(I, M)=\inf\{i: \Ext^i_R(R/I, M)\notin S\}=\inf\{i: H^{i}_{I}(M)\notin S\}.$ Also some properties of this notion are investigated. It is proved that $S-\depth(I, M)=\inf\{\depth M_{\frak p}: \frak{p}\in{\rm V}(I)\ \text{and}\ R/\frak{p}\not\in S\} =\inf\{S-\depth(\frak{p}, M): \frak{p}\in{\rm V}(I)\ \text{and}\ R/\frak{p}\not\in S\}$ whenever $S$ is a Serre subcategory closed under taking injective hulls, and $M$ is a $ZD$-module.