Created
March 19, 2017 18:40
-
-
Save patkleef/11dca1955ca3513f4151f7caa2822197 to your computer and use it in GitHub Desktop.
Application Insights Blog - ApplicationInsightsHomeActionMethod.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public ActionResult Index() | |
| { | |
| var arr = new string[2]; | |
| try | |
| { | |
| arr[0] = "value 1"; | |
| arr[1] = "value 2"; | |
| arr[2] = "value 3"; | |
| var result = arr[3]; | |
| } | |
| catch (Exception ex) | |
| { | |
| var dic = new Dictionary<string, string>(); | |
| dic.Add("variable: arr", string.Join(",", arr)); | |
| _telemetryClient.TrackException(ex, dic); | |
| } | |
| return View(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment