.Net – Reflection

Background When programming tracking the current class/method can be helpful. Also, capturing the Stack Trace can also be informative.   C# Current Class Current Method StackTrace Output   Vb.Net Current Class Current Method StackTrace Output   Source Code .Net Fiddle C# Link Vb.Net Link Summary This post ended up being a lot of fun. Comparing … Continue reading .Net – Reflection

.Net :- String.Join returns “System.String[]”

Background Hit a curb yesterday and wanted to share about it today. I have a collection and attempted to display its contents.   Code Original Output Image   Revision Output Image Sharing Restester.com Links Visual Basic Online Compiler Link Vb.Net - Displaying Collection Contents Link Git Gist CollectionDisplayContents Link Dedicate Dedicating to:- string.Join(string, string[]) returns … Continue reading .Net :- String.Join returns “System.String[]”

PowerShell – Using Pipeline Functions

Background In its design, Powershell offers a very elegant mechanism for pipeline handling. For instance, often in software development, we will need to process sets. Outline Function :- showFileContent Parameters ValueFromPipeline $filename Declare Local Variables [int] $rc = 0; [string] $filenameFullName = $null; [string] $filenameLeaf = $null; Process Increment script variable $fileNumber ( $script:fileNumber ) … Continue reading PowerShell – Using Pipeline Functions

.Net – String Collection – Dumping list’s contents

Background A few days ago I needed to examine the contents of a string collection. I was surprised that the contents of the collection were not dumped. What was dumped instead is the collections' class name. Examination Outline Let us give a couple of use cases:- Array of String System.Collections.Generic.List<string> System.Collections.Specialized.StringCollection System.Collections.Specialized.StringCollection Convert   Array … Continue reading .Net – String Collection – Dumping list’s contents

.Net – Compilation Error Message – “error CS0246: The type or namespace name ‘[interface]’ could not be found (are you missing a using directive or an assembly reference?)”

Background Continuing to play around with .Net C#. Specifically, Generics. Ran into an error I could not get beyond. Error Error Message Code Error Message   TroubleShooting Add Namespace Code Preface usage by indicating the code uses classes in the System.Collections.Generic namespace.   Error Compiled and got an error that reads:- Remediation Add Third-Party Namespaces … Continue reading .Net – Compilation Error Message – “error CS0246: The type or namespace name ‘[interface]’ could not be found (are you missing a using directive or an assembly reference?)”

Microsoft.Net Web Site ( v2.5 ) – Error Message – “CS1002: ; expected”

Background Have a very old .Net website that is running .Net Framework 2.5. A couple of days added a new module to it. Generics The new module relies on generics. Declare List Array The code looks like this:-   Error Message Here is the error message Error Message - Text Error Message - Image   … Continue reading Microsoft.Net Web Site ( v2.5 ) – Error Message – “CS1002: ; expected”

Visual Studio – Compilation – Error – “The type or namespace name ‘ManagementScope’ could not be found (are you missing a using directive or an assembly reference?)”

Background Using Visual Studio to compile an application. Ran into a little error. Error Messages Error Messages - Text Error CS0246 The type or namespace name 'ManagementScope' could not be found (are you missing a using directive or an assembly reference?) The type or namespace name 'ObjectQuery' could not be found (are you missing a … Continue reading Visual Studio – Compilation – Error – “The type or namespace name ‘ManagementScope’ could not be found (are you missing a using directive or an assembly reference?)”

C# Compiler Error:- “error CS0006: Metadata file ‘log4net.dll’ could not be found”

Background Trying to compile a C# application, ran into a little error. Error Error Message - "error CS0006: Metadata file 'log4net.dll' could not be found" Image Textual error CS0006: Metadata file 'log4net.dll' could not be found   Resolution Avail log4net.dll Outline Use Nuget Artifact   Nuget Nuget is yet to be configured\tested on our development … Continue reading C# Compiler Error:- “error CS0006: Metadata file ‘log4net.dll’ could not be found”