{"id":15425535,"url":"https://github.com/patridge/vb-default-tests","last_synced_at":"2026-02-13T14:51:11.284Z","repository":{"id":3066343,"uuid":"4089023","full_name":"patridge/VB-default-tests","owner":"patridge","description":"Confirming the various ways of doing C#'s default(T) in VB","archived":false,"fork":false,"pushed_at":"2014-07-02T16:18:44.000Z","size":160,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-30T14:40:02.837Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Visual Basic","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/patridge.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-04-20T16:58:07.000Z","updated_at":"2014-07-02T16:18:44.000Z","dependencies_parsed_at":"2022-09-04T04:10:08.424Z","dependency_job_id":null,"html_url":"https://github.com/patridge/VB-default-tests","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/patridge/VB-default-tests","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patridge%2FVB-default-tests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patridge%2FVB-default-tests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patridge%2FVB-default-tests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patridge%2FVB-default-tests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/patridge","download_url":"https://codeload.github.com/patridge/VB-default-tests/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patridge%2FVB-default-tests/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29410317,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T06:24:03.484Z","status":"ssl_error","status_checked_at":"2026-02-13T06:23:12.830Z","response_time":78,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T17:52:42.477Z","updated_at":"2026-02-13T14:51:11.157Z","avatar_url":"https://github.com/patridge.png","language":"Visual Basic","funding_links":[],"categories":[],"sub_categories":[],"readme":"VB-default-tests\n================\n\nConfirming the various ways of doing C#\u0026#39;s `default(T)` in VB are all equivalent.\n\nMethods tested [using simple Debug.Assert on a command line app]:\n\n    Public Function GetDefaultDeclaration(Of T)() As T\n        Dim result As T = Nothing\n        Return result\n    End Function\n    Public Function GetDefaultNothingDirect(Of T)() As T\n        Return Nothing\n    End Function\n    Public Function GetDefaultNothingCtype(Of T)() As T\n        Return CType(Nothing, T)\n    End Function\n    Public Function GetDefaultNothingDirectCast(Of T)() As T\n        Return DirectCast(Nothing, T)\n    End Function\n    \nMethod not tested:\n\n    Return New T() ' Not equivalent to default(T) at all and only works for reference types.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatridge%2Fvb-default-tests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatridge%2Fvb-default-tests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatridge%2Fvb-default-tests/lists"}