简体   繁体   中英

How to give meaningful names to a C# and VB.NET project in the same solution with the same purpose?

I have two projects that contain extension methods. One project is implemented using C# and the other is implemented using VB.NET as there are some things I can do in VB.NET that I can't in C# and I want to leverage those features in my extension methods.

How can I name the projects to convey their meaning while at the same time differentiating that they are implemented in different languages?

For the C# elitists:

One of the features that VB.NET supports that C# doesn't:

Doesn't C# Extension Methods allow passing parameters by reference?

FYI: This doesn't work for reference types, which is what I'm interested in.

public static void LoadFromXml<T>(this T targetObject, string xml)
{

    targetObject = _Serializer.DeserializeFromXML<T>(xml);

}

How can I name the projects to convey their meaning while at the same time differentiating that they are implemented in different languages?

I would actually to not convey this. Give both projects names which are meaningful in and of themselves. Each project should be usable by both languages, so the names should make sense regardless of the language used to create the project.

Ah... just saw your comment. I would recommend implementing most of your extension methods in C# and calling it "Core", then implement the extra features in VB.NET and call it "Extended".

Then, have the VB.NET explicitly reference Core and inherit from it. Users can then use the Core assembly for most of the tasks, or Extended for the additional features.

EDIT: I still think your users would be better off if you figured out a way NOT to split the assemblies, but obviously I don't know all of your requirements/implementation details.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM