Yes, and this is one of the best explanations ever. Thank you.
Zachery Hysong
Posts
-
Correct Syntax; No Result? -
Correct Syntax; No Result?Actually, I was able to finally figure this out, I was missing a `ref` in the Method Definition:
public void optionCheck(TextBox txt, ref string str)
Then when I call it:
optionCheck(txtDoorsSafety1, ref strDoorsOption1)
That works... Though I have to say... the concept of having to write `ref` twice seems counterintuitive to me.
-
Correct Syntax; No Result?Hey guys, I have a strange problem. I am trying to write a function that looks at a TextBox that, if it is equal to a certain value, changes the value of a string to something else. Here is my code: I define the string in Main:
string strDoorsOption1 = "test";
The Method is defined as:
public void optionCheck(TextBox txt, string str)
{
if (txt.Text == "0")
{
str = "+++";
}
else
{
str = "---";
}
}I call the Method like this:
private void chkDoorsSafetyLaminated_CheckedChanged(object sender, EventArgs e)
{
checkBoxClick3(chkDoorsSafetyLaminated, txtDoorsSafety1);optionCheck(txtDoorsSafety1, strDoorsOption1);
}
checkBoxClick3 is another Method that works as intended to change the value of a TextBox. For reference, it is defined as follows:
public void checkBoxClick3(CheckBox check, TextBox txt)
{
/* Determine the CheckState of the Checkbox */
if (check.CheckState == CheckState.Checked)
{
/* If the CheckState is Checked, then set the value to 1 */
txt.Text = "1";
}
else
{
/* If the CheckState is Unchecked or Inditerminate, then set the value to 0 */
txt.Text = "0";
}
}This works...:
if (txtDoorsSafety1.Text == "0")
{
strDoorsOption1 = "+++";
}
else
{
strDoorsOption1 = "---";
}But when I call optionCheck(txtDoorsSafety1, strDoorsOption1); it acts as if the method is empty. It completely compiles with no errors or warnings, it simply does nothing. Any help would be appreciated.
-
How to run C# application without installing .Net frameworkAny Tablet running Windows 8.1 or 8.1 Pro should be fine, just remember to keep away from Windows RT. All the big name Tablets, Surface Pro, Yoga, what have you, all run 64-Bit Processors and should have no problem running VS2008, or higher even. And there are TONS of programs (I still refuse to use the term "app") for accessing and modifying SQL Databases.
-
Code Review?Hey guys, I have been working on modifying some code and a few other things in my project as I have been learning of better techniques. I have been able to reduce my code by a few thousand lines, by writing some Functions to do what I need, rather than copying code everywhere. What I would like to do is post my code in a public ::workspace and share it with the community so that you all can see it and maybe help me make it even better. If I did that, would there be anyone willing to help, and if so, what is the best method of me uploading it? I can use git with a new ::workspace, and there really is not much to it at the moment. It is simply one form, with about 14-15 buttons, a DataGridView and a few ComboBoxes. The Functions I have written, I have to wonder if they can't be combined somehow for even less code, but I haven't had the time to look into it. Basically, this form, when completed, will access several different MySQL Tables (Yes, I know I could combine them, and eventually I will, but right now, we want them this way for learning purposes.). The ComboBoxes then fill with data based on the Table selected by the buttons. I will be adding buttons to copy information into a different table, as well as a few other things. Anyways, that's what I was wondering. Thoughts?
-
Question quality is dropping on Stack OverflowNo harm done, or intended. I know what you meant, just trying to point out that it was bad enough that I stopped commenting or anything over there. I was quite literally bullied away.
-
Question quality is dropping on Stack OverflowI disagree. I feel there are many questions that deserve an answer, but have not been asked, especially for new programmers who can't extrapolate the parts of code from a different question. I also feel that the people there are getting quite rude and unhelpful. I asked a simple question about the proper syntax for a MySQL Query being embedded within C# code, and instead of answering me, there was like 15 answers, all about how I didn't ask it right, even though they knew what I was asking, and they shut down my question. That is one of the biggest reasons I enjoy coming to CodeProject. We don't have issues like that here. We seem to be more understanding and we try to look past imperfect syntax and answer what they need to know.
-
VSO (Visual Studio Online) m loving itI plan to as soon as I get the chance. I have been using VS Ultimate 2013 for the past few months, and I am really excited about it.
-
VSO (Visual Studio Online) m loving itI've not used VSO yet, but I have been reading up on it and I am very intrigued. I wish I had more time to try it out.
-
I like the new premium membership icon!Premium Accounts for ::Workspaces[^] are how you get a Premium account. Nobody gets one automatically because it is not free. It is $2 a month.
-
my icon!Ah, well you got it back now! :) YAY! Apparently there is no Supporter Icon anymore, the closest thing to it seems to be the Premium, which I have because I have a Paid Account in ::Workspaces.
-
my icon!As I am pretty new here. Can you tell me what the Bob icon was for? What did you do to get it?
-
my icon!Oh, and I think what Nelek meant by "just registered" was that that is all they did, not that they had done it recently.
-
my icon!In that case, I would expect that you simply haven't "done enough" to merit being classified in one of the other "icon categories". I am in no way trying to say that you have done nothing since the site was created, so please, take no offence to that, but the "new" icons are specific to different things, and I would guess that is the reason.
-
Graphical Glitch (Bookmarks) -
Quality of Code Project diminishingAnd the site developers are not important? If they add a "feature", as you call it, then there was obviously a reason. In fact, Chris even specifically told you what that reason was. No matter his feelings on the matter, he implemented it, and told us why and what he uses it for. He may have done it for "selfish reasons" but that does not mean he is the only human on the planet that will ever use it.
-
Quality of Code Project diminishingWhat is the number of ads you are seeing? I usually use AdBlock for Chrome, but after reading this, I have disabled it for this site, and I still have no issues navigating the site whatsoever. In fact, on any given page, I am only seeing a maximum of 3 ads, and they are always in the same places, the header, footer, and the right side of the page. I am all for contributing to help make something more professional, but I don't think removing ads is the way to go. As Chris has mentioned in multiple replies, you can indeed submit both bugs and suggestions. So, my question to you is this: Other than your issues with not being able to find where to submit bugs and suggestions, and the ads that appear to be working incorrectly on your browser, what other issues are you having, and what exactly do you want done about it. P.S. The addition of Workspaces for this site actually intrigued me so much so that I immediately signed up for a paid subscription. I love how simple it is to use, and how fast CP updating it. My suggestion would be to maybe implement an ad-free version of the site for those that have a paid subscription. It would not affect me either way, but it's just an idea. ;P
-
First Workspace, two questionsI did not see that, but both articles are now bookmarked. Thanks again!
-
First Workspace, two questionsPerfect, this will definitely come in handy. Thank you.
-
First Workspace, two questionsHey guys, I just bought a Pro Workspace membership, and am now using CodeProject as my Git Repository. I have never used Git before, however, and I was wondering: Does anyone have a favorite Tutorial, eBook, video, etc. for learning git? I am a Windows 8.1 user, both by choice and by requirement, and I use Visual Studio 2013, as well as a selection of other software for editing. The second question is: Is there a place that explains exactly how CodeProject interprets MarkDown? I did a search and I didn't find anything.