What are you talking about?
He's got an issue with the VS IDE, since VS2010 and newer are all WPF apps what does your winforms rant even have to do with this?
Why would this matter?
I mean if you're using Sql Server you could write a trigger to re-assign all of the ID's sequentially for the table's records after delete, but why would that matter?
Skydiver and Sheepings, he's using VS 2008 which can only target .Net 2.0, 3.0, and 3.5
What he needs to do first is download the VS2019 Community Edition (it's free) then he can open his project in it and change it to target .Net 4.8
All languages are difficult when you have no knowledge of them, this applies both to computer (programming) languages as well as human written/spoken languages throughout all of history.
Is there a question about this? Or should we just close the thread now?
When you're calling the stored procedure you're actually passing it a sql comment which means Sql Server wont process anything, if you change your SqlCommand to do "Exec
usp_Close;" I'm sure you'll see it actually run the query in the procedure.
Just a brain storming idea, what if he didn't have an array at all.
What if he had a class that had the the first cell of the grid, the length of the ship, and the orientation (vertical or horizontal).
Then all he would need is the collection of that class for however many (and sizes) of ships...
I don't remember the original plastic "board" game having a rule that you can't place ships right next to each other and the earliest digital game I remember was Radar Mission (Nintendo Game Boy, 1991) which allowed ships to all placed next to each other too.
But the OP's array matrix isn't...
Right off the bat I'm seeing 3 areas:
1. In your post I don't see anything about what you're expecting your code to do, so if we're to look at it we have no idea what the intention is to be.
2. In your code I don't see any code comments, granted this is a short snippet that's easy to figure out...
I have a different approach question, you say you need this C# code to be available to the Access database, is the database also housing the application stuff too? IE forms, reports, etc?
If so, what would it take to replicate that in a c# app?
Reason I ask is because using a C# dll in Access...
Take a look at the WriteLine() call, it's overloaded and you're using one of the overloads but aren't meeting the index criteria for it.
Of course I know what you're trying to do with your code and what you're needing to do is concatenate your variables when you call WriteLine()
I doubt he's changing the Power Options settings in Windows just for his app. I think he's putting together an app to change these settings in a more automated manor, this is actually something I do every time I install Windows (XP and newer) too.
I've always known you can change stuff like...
Welcome to refactoring, if you see that two or more routines are pretty close in code what do you think you would need to do to make it so it's 1 call with parameter(s)?
Look at the two you've provided here already, what do you think the parameter(s) should be to make them be identical calls?
Do you have access to Sql Server or similar?
What you could do is load all of the data into a table then use a query to pull out a single record from the dups, the nice part about doing it this way is you can add a more granular criteria for which one of the duplicates you grab instead of the...
The 2 issues I see right off the bat is the use of the single quotes instead of double quotes and the use of a single equal when trying to use it for evaluation, the line should be this:if (ris == "s")
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.