Figuring out a variable’s type has become more important since now variables can be boxed by their parent class(s) (Where all can be “Object”). It’s nice because it allows for one generalized function to work with many types that perform an action on a common attribute, or first figure out what the object is and then perform the action. That is one of the instances where figuring out a variables type is important. .NET has a built-in function called GetType() which figures out what type a variable is. //loop through the controls in the panel and figure out //which of the checkboxes are checked foreach (Control panelControl in newCheckListQuestionPanel.Controls) { //only continue if this control is a checkbox if(panelControl.GetType().ToString() .Equals("System.Windows.Forms.CheckBox") == true) { if (((CheckBox)panelControl).Checked == true) ...
Currently ChatGPT is in a free “initial research preview” . One of its well known use cases at this point is generating software code. I’ve also just used it to write most of this article… Well, actually a future article about cleaning up SRT subtitle files of their metadata faster than I have been by hand with Notepad++ and its replace functionality. Update: I recorded a screencast of writing the SRT subtitle cleaner application loading and processing portion. I relied heavily on ChatGPT for code. It was a fun process! https://youtu.be/TkEW39OloUA ChatGPT, developed by OpenAI, is a powerful language model that can assist developers in a variety of tasks, including natural language processing and text generation. One such task that ChatGPT can help with is creating an SRT cleaner program. SRT, or SubRip Subtitle, files are commonly used to add subtitles to video files. However, these files can become cluttered with unnecessary information, such as timing lines or blank spaces. To clean...