Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
1 vote
5 answers
3k views

PHP function to obtain model_name from Namespace\To\ModelName

Would there be a more clear/efficient way to write ...
Grey's user avatar
  • 217
11 votes
5 answers
31k views

Convert a custom object to a query string

I wrote an extension method that takes a custom object and converts its properties to a query string for use in a URL. You can specify what properties you want included by using a ...
an earwig's user avatar
  • 445
1 vote
1 answer
126 views

Object formatter using reflection

I am making an object formatter for use when debugging. Formatted class: ...
MCMastery's user avatar
  • 203
1 vote
1 answer
5k views

Custom Exception.ToString() formatter

I find the default Exception.ToString() formattig very difficult to read especially if there are inner exceptions involved. I guess everyone knows how it looks: <...
t3chb0t's user avatar
  • 44.3k
3 votes
2 answers
51k views

Getting a list of all fields in an object

I've got the following code that I use to output a list of all (public) fields in an object in an easy(ish) to read way. The issue with it is that the code is not easy to look at, and I'm not sure ...
Jack Wilsdon's user avatar
  • 1,641