File tree Expand file tree Collapse file tree 1 file changed +0
-23
lines changed
Expand file tree Collapse file tree 1 file changed +0
-23
lines changed Original file line number Diff line number Diff line change 1212// See the License for the specific language governing permissions and
1313// limitations under the License.
1414
15- using System ;
16- using System . Reflection ;
17- using System . Runtime . CompilerServices ;
18-
1915namespace OnixLabs . Playground ;
2016
2117internal static class Program
2218{
2319 private static void Main ( )
2420 {
25- try
26- {
27- InvalidOperationException ex = new ( "Hello" ) ;
28-
29- foreach ( PropertyInfo property in ex . GetType ( ) . GetProperties ( BindingFlags . Public | BindingFlags . Instance ) )
30- {
31- Console . WriteLine ( $ "{ property . Name } = { property . GetValue ( ex ) } ") ;
32- }
33-
34- throw ex ;
35- }
36- catch ( Exception ex )
37- {
38- foreach ( PropertyInfo property in ex . GetType ( ) . GetProperties ( BindingFlags . Public | BindingFlags . Instance ) )
39- {
40- Console . WriteLine ( $ "{ property . Name } = { property . GetValue ( ex ) } ") ;
41- }
42- }
43-
4421 }
4522}
You can’t perform that action at this time.
0 commit comments