Normally, however, you rarely calculate an inverse or a pseudoinverse of a matrix, because most of the time what you really want to do is solve a system of linear equations (either determined, under-determined (min-norm problem), or over-determined (least-square problem)). And if you are solving a system of linear equations, you should solve the system of linear equations directly, not through the calculation of an inverse or pseudo-inverse. The systems of linear equations are solved with the same method as for finding the inverse (i.e., the inverse is just the result of solving a system of linear equations where the right-hand side is the identity matrix), but it is quicker to do it in one step. And for that reason, most matrix libraries will provide both functions (and several others related to them). One example is my QR decomposition code which has several related functions like QR, RQ, RRQR and StrongRRQR decompositions, as well as upper / lower triangular back / forward substitution functions, which can be used to construct just about any kind of inversion or linear solution to equation system, least-square or minimum-norm.
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each subCtrl As Control In ctrl.Controls
If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then
If subCtrl.GetType Is ...