Expanding from my comment here's a bit of code that might help:
Private Function GetAliasList(pPath As String, pShapeName As String) As List(Of String)
Dim AliasReturnList As List(Of String) = New List(Of String)
' Open the workspace'
Dim pWorkspaceFactory As IWorkspaceFactory = New ESRI.ArcGIS.DataSourcesFile.ShapefileWorkspaceFactory()
Dim pWorkspace As IWorkspace = pWorkspaceFactory.OpenFromFile(pPath, 0)
Dim pFeatureWorkspace As IFeatureWorkspace = CType(pWorkspace, IFeatureWorkspace) ' need IFeatureWorkspace to open a feature class'
' Open the shapefile in the workspace'
Dim pFeatClass As IFeatureClass = pFeatureWorkspace.OpenFeatureClass(pShapeName)
For pCnt As Integer = 0 To pFeatClass.Fields.FieldCount - 1
' access each field in turn.. don't really need to cast to a '
' field object but I'll do it for clarity, normally I'd access''
' directly using pFeatClass.Fields.Field(pCnt)'
Dim pThisField As IField = pFeatClass.Fields.Field(pCnt)
AliasReturnList.Add(pThisField.AliasName) ' add the AliasName to the list
' note that if an alias is not set it defaults to the field name'
Next
' now return it..'
Return AliasReturnList
End Function
You've got as far as connecting to the workspace but you need an IFeatureWorkspace to open a feature class, from the IFeatureClass you can iterate the IField objects from IFeatureClass.Fields to obtain the AliasName of each field. Note that this is the same for file GDB, personal GDB, shapefiles, CAD etc.. except the IWorkspaceFactory needs to be created from the correct CoClass (see the CoClasses here, there's a lot of them), for shapefiles it's ESRI.ArcGIS.DataSourcesFile.ShapefileWorkspaceFactory and for personal geodatabase it's ESRI.ArcGIS.DataSourcesGDB.AccessWorkspaceFactory.
In your code sample the messagebox will never be hit because it's after the Return statement.. nothing (besides end function) should appear after a return statement because the process returns immediately and goes no further.
Your path as specified is half 'C' and half 'VB', C uses the slash as an escape character which is why it's always doubled (\\ => \)
, VB uses different escaping so the slashes are not doubled.
Don't feel I'm trying to be mean when I point out mistakes in your code, I wouldn't really be helpful if I showed you how to get an alias name but didn't point out the obvious mistakes.