{"action":"opened","issue":{"url":"https://api.github.com/repos/code-cracker/code-cracker/issues/385","labels_url":"https://api.github.com/repos/code-cracker/code-cracker/issues/385/labels{/name}","comments_url":"https://api.github.com/repos/code-cracker/code-cracker/issues/385/comments","events_url":"https://api.github.com/repos/code-cracker/code-cracker/issues/385/events","html_url":"https://github.com/code-cracker/code-cracker/issues/385","id":88891411,"number":385,"title":"Use short-circuit evaluation (VB)","user":{"login":"WennderSantos","id":7007105,"avatar_url":"https://avatars.githubusercontent.com/u/7007105?v=3","gravatar_id":"","url":"https://api.github.com/users/WennderSantos","html_url":"https://github.com/WennderSantos","followers_url":"https://api.github.com/users/WennderSantos/followers","following_url":"https://api.github.com/users/WennderSantos/following{/other_user}","gists_url":"https://api.github.com/users/WennderSantos/gists{/gist_id}","starred_url":"https://api.github.com/users/WennderSantos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WennderSantos/subscriptions","organizations_url":"https://api.github.com/users/WennderSantos/orgs","repos_url":"https://api.github.com/users/WennderSantos/repos","events_url":"https://api.github.com/users/WennderSantos/events{/privacy}","received_events_url":"https://api.github.com/users/WennderSantos/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-17T02:26:16Z","updated_at":"2015-06-17T02:26:16Z","closed_at":null,"body":"Before: \r\n```vb\r\nif (x And y){\r\n  return true;\r\n}\r\n```\r\nAfter:\r\n```vb\r\nif (x AndAlso y){\r\n  return true\r\n}\r\n ```\r\nThe first operation corresponds to the second one, except that in the second one if x is false, y is not evaluated, because the result of the AND operation is false no matter what the value of y is. Using the second operation you can earn a little bit of performance. \r\n\r\nThe same in OR operator\r\n\r\nBefore: \r\n```vb\r\nif (x Or y){\r\n  return true;\r\n}\r\n```\r\nAfter:\r\n```vb\r\nif (x OrElse y){\r\n  return true\r\n}\r\n ```\r\n\r\nIn the second operation, if the value of x is true, y is not evaluated."}}