Background A few weeks ago, I was in a jam. I wanted to draw a line on my console to separate out two sections of output. It seems terrible inefficient to use Write-Output("----------------------------------------"). I preferred something like Write-Output(repeatChars('-', 80)). Code Here is stolen code that I have to come back and properly attribute ( give … Continue reading Powershell:- Repeat Character
Class ( Microsoft – .Net )
.Net:- Error – ‘System.Data.DataRowCollection’ does not contain a definition for ‘OfType’ and no extension method ‘OfType’ accepting a first argument of type ‘System.Data.DataRowCollection’ could be found
Background Still here trying to steal that same old code. Lineage .Net:- Compile Error – ‘System.Data.DataRow’ does not contain a definition for ‘Field’ and no extension method ‘Field’ accepting a first argument of type ‘System.Data.DataRow’ Link Error Message Textual Image Explanation The error states that The System.Data.DataRowCollection object is missing the Field Property … Continue reading .Net:- Error – ‘System.Data.DataRowCollection’ does not contain a definition for ‘OfType’ and no extension method ‘OfType’ accepting a first argument of type ‘System.Data.DataRowCollection’ could be found
.Net:- Compile Error – ‘System.Data.DataRow’ does not contain a definition for ‘Field’ and no extension method ‘Field’ accepting a first argument of type ‘System.Data.DataRow’
Background Trying to steal someone else's code. But, as sometimes happens, it does not even compile. Error Message Textual Image Explanation The error states that The System.Data.DataRow object is intrinsically missing the Field Property And, that I have not helped to even include an extension method that will provide one Remediation As … Continue reading .Net:- Compile Error – ‘System.Data.DataRow’ does not contain a definition for ‘Field’ and no extension method ‘Field’ accepting a first argument of type ‘System.Data.DataRow’
PowerShell:- Out-GridView -PassThru | Set-Clipboard
Background Yesterday, I found myself struggling with a database project. I thought let me capture some metadata, view it in a grid view and I will have more to go with. Clipboard Captured the data into a data table, pipelined it into GridView. Got a good thing going. As always got greedy. Thought to … Continue reading PowerShell:- Out-GridView -PassThru | Set-Clipboard
Powershell:- Get Machine Name
Background I needed to confirm a machine name. It is easy to do so via accessing the machine and running a few system commands. But, want to do so programmatically, as well. Choices Here are some of the options for getting a machine name in PowerShell. Get Computer Name Using Environment Variables .Net Class System.Environment … Continue reading Powershell:- Get Machine Name
.Net Error:- “COM object that has been separated from its underlying RCW cannot be used”
Background Last night after a long day of code rewrite, ran into an error that threatened to force me to discard the numerous optimizations I had taken the time and effort to labor over. Error Message Here is the full error message:- Remediation Outline Code Review Code Rewrite Code Review Please review your code. … Continue reading .Net Error:- “COM object that has been separated from its underlying RCW cannot be used”
.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[]”
You must be logged in to post a comment.