|
Sam Hobbs wrote: Much of .Net is based on Java. How much are you saying is based on Java?
And what do you mean by "based on?"
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
There are some 124 name spaces in the framework / class library; maybe 20% are dedicated to GUI programming. UWP and WPF use DirectX; which is close enough to driver level.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
Gerry Schmitz wrote: There are some 124 name spaces in the framework / class library
Try counting again - there are 2305 namespaces listed here[^].
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I just Googled for a number; it returned one big enough to use. I suspect there are "major" ones and "minor" ones. I'll even take your word for it without bothering to check.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
Sam, Gerry thanks for feedback
|
|
|
|
|
I have a one-man-show small business with a complex, mature and utterly reliable .NET Framework 4.6.1 WPF app and associated libraries, etc. I'm always busy adding requested features and doing customizations for my customers. My question is - how important is it that I drop my income-generating activities and port all of this to the latest .NET 6 or whatever? I would value advice from those who have done this upgrade...
|
|
|
|
|
"If it ain't broke, don't fix it."
Start a new project with the latest version - no point in upgrading software if you aren't adding features, all you do is risk adding problems or inefficiencies because you aren't fully familiar with a new framework (however similar it may be).
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Having read the comments on your article about non binding MVVM I imagine your "upgrade" would be a bloody nightmare having gone down a non standard path (assuming you have maintained that style).
The greatest nightmare of a one man show - when do I HAVE to move to the latest version of my tool(s), all the while building technical debt. Think of the poor sods still on VB6!
I agree with OG - you need the income stream and stability, unless your clients are screaming for the latest version I would leave it. When (Ghu forbid) they demand you go to a browser based solution then you change!
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
That "MVVM without binding" project was such a failure that the last time you flew in a commercial jet, the turbine blades might have been shaped by that software
My clients (industrial machine builders) wouldn't know a Framework from a Core from a Standard unless I whacked 'em on the head with them.
|
|
|
|
|
I found it easy to move from WPF to UWP, and now prefer UWP because of the Windows Store though I think you can move WPF to the store now (easy customer distribution). I also think the UWP event model is more comprehensive. And there's local and roaming storage, etc. Nothing you would miss unless you went looking, and then you do.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
I moved many thousands of lines from .Net Framework 4.x to 4.81 to finally move them to .Net 3 up to .Net 7.0 (including WPF programs). The main job is to redo the project in the new .Net format, compile and correct the few compilation errors you found. This answer gives a hint on the difficulty problem but don't address the importance of porting it to .Net Core.
Jacques Fournier
Consyst SQL Inc.
www.consyst-sql.com
|
|
|
|
|
Bruce Greene wrote: My question is - how important is it that I drop
You have two customer bases
1. Existing
2. New
For both types of customers do they buy new hardware? How often do they upgrade windows?
Leaving it as is runs the risk of, at some point, your software will fail in some odd way or not run at all because of updates to windows.
However updating also runs the risk that will not run on older versions either.
These days older apps also have an increased security risk. Or at least it is perceived that way. So it is possible at some point that something (like a virus checker) might flag the app for something. Which makes customers nervous.
You might also want to validate how exactly your build process works. If you are expecting to be able to download libraries (specific versions) any time you want at some point that might no longer be possible. You can address that keeping the libraries in your own source control and download nothing.
Besides the customers the primary way is to look for "end of life" for anything. Could be operating system, libraries, hardware etc.
For the version you specified above the date is April 26, 2022. It is unlikely anything will fail now. But you probably don't want to still be waiting 5 years from now.
Microsoft .NET Framework - Microsoft Lifecycle | Microsoft Learn[^]
If you have customers that do not upgrade then you will also need to plan on continuing supporting them. Note that this also means that you will need to have hardware and operating system that you can both test on and develop on. Keeping in mind however that even if it is good money maker at some point even they will find it difficult to keep running with the old equipment. Although some people are very ingenious at finding sources.
|
|
|
|
|
Using C# and Word 16.0.
var wordApp = new Microsoft.Office.Interop.Word.Application();
wordApp.Visible = false;
Document wordDoc1 = wordApp.Documents.Add();
Document wordDoc2 = wordApp.Documents.Open(@"c:\users\robertsf\desktop\doc2.docx");
When this code executes, wordDoc1 gets clobbered, everything returning COM Exception, and wordApp.Documents contains only one object, the opened document.
var wordApp = new Microsoft.Office.Interop.Word.Application();
wordApp.Visible = false;
Document wordDoc1 = wordApp.Documents.Add();
Document wordDoc1a = wordApp.Documents.Add();
Document wordDoc2 = wordApp.Documents.Open(@"c:\users\robertsf\desktop\doc2.docx");
When this code executes, wordDoc1 gets clobbered again, but wordDoc1a is fine, and wordApp.Documents contains two objects.
var wordApp = new Microsoft.Office.Interop.Word.Application();
wordApp.Visible = false;
Document wordDoc2 = wordApp.Documents.Open(@"c:\users\robertsf\desktop\doc2.docx");
Document wordDoc1a = wordApp.Documents.Add();
When this code executes, however, everything is fine. wordApp.Documents contains two objects, and each object is accessible, as expected.
I'm trying to programmatically create a new document and copy the text of a variable number of documents into it. I suppose I could open all the source documents before creating the destination document. Or I could try to create two instances of Word.Application , one for the source documents and one for the destination document, and then see if I can copy between the two instances.
Here's the MS documation.
Add: Documents.Add(Object, Object, Object, Object) Method (Microsoft.Office.Interop.Word) | Microsoft Learn[^]
Open: Documents.Open Method (Microsoft.Office.Interop.Word) | Microsoft Learn[^]
I don't see anything about one operation overwriting the other. ¯\_(ツ)_/¯
|
|
|
|
|
I was going to delete this, but I'll leave it up in case someone else has the same problem. Here's the solution -- the call to Documents.Open has to have more arguments. The MS documentation says they're optional, but there are side-effects to not providing them.
var wordApp = new Microsoft.Office.Interop.Word.Application();
wordApp.Visible = false;
Document wordDoc1 = wordApp.Documents.Add();
Document wordDoc1a = wordApp.Documents.Add();
Document wordDoc2 = wordApp.Documents.Open(@"c:\users\robertsf\desktop\doc2.docx",
false, false, false, "", "", false, "", "", WdOpenFormat.wdOpenFormatAuto,
MsoEncoding.msoEncodingUTF8, false, false, none, none, none); Now it works as expected. I haven't experimented to see exactly which argument caused the issue.
|
|
|
|
|
This is my code.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerController : MonoBehaviour
{
public float JumpY = 10;
public float JumpZ = 1;
public float JumpX = 0;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
if (KeyCode.Space = true)
{
transform.translate(0, 10, 1);
}
}
|
|
|
|
|
Just like the error says. You're missing a closing curly brace at the end of the code.
If you're not indenting your code properly, it's easy to lose track of the braces that should match up.
|
|
|
|
|
To add to what Dave said, you should expect to get syntax errors every day, probably many times a day while you are coding - we all do regardless of how much experience we have! Sometimes, we misspell a variable, or a keyword; sometimes we forget to close a string or a code block. Sometimes the cat walks over your keyboard and types something really weird. Sometimes we just forget how many parameters a method call needs.
We all make mistakes.
And because we all do it, we all have to fix syntax errors - and it's a lot quicker to learn how and fix them yourself than to wait for someone else to fix them for you! So invest a little time in learning how to read error messages, and how to interpret your code as written in the light of what the compiler is telling you is wrong - it really is trying to be helpful!
So read this: How to Write Code to Solve a Problem, A Beginner's Guide Part 2: Syntax Errors[^] - it should help you next time you get a compilation error!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
It's like a cursor only larger and more complex.
|
|
|
|
|
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind - we only get exactly what you type to work with - we get no other context for your project.
Imagine this: you go for a drive in the country, but you have a problem with the car. You call the garage, say "it broke" and turn off your phone. How long will you be waiting before the garage arrives with the right bits and tools to fix the car given they don't know what make or model it is, who you are, what happened when it all went wrong, or even where you are?
That's what you've done here. So stop typing as little as possible and try explaining things to people who have no way to access your project!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
By creating an object based on a "Control"; and by varying it's .Left and .Top properties at run time over a given interval.
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
Make a system that will allow the user to add, modify, display, search and delete records in a derived classes.
Base class is 'Person'
Subclasses of Person = Employee and Student
Under Employee we also have subclasses namely= teacher and staff member.
Please help me.
|
|
|
|
|
This is the C# forum, not C++. That's here[^].
Again, you'll have to describe the problem you're having. Just saying "I need help" will not do.
|
|
|
|
|
Again, two things:
1) This is a C# forum, not C++. The two languages look similar, but are very, very different.
2) While we are more than willing to help those that are stuck, that doesn't mean that we are here to do it all for you! We can't do all the work, you are either getting paid for this, or it's part of your grades and it wouldn't be at all fair for us to do it all for you.
So we need you to do the work, and we will help you when you get stuck. That doesn't mean we will give you a step by step solution you can hand in!
Start by explaining where you are at the moment, and what the next step in the process is. Then tell us what you have tried to get that next step working, and what happened when you did.
Just posting your assignment isn't going to get you anywhere.
If you are having problems getting started at all, then this may help: How to Write Code to Solve a Problem, A Beginner's Guide[^]
Posting the same homework multiple times isn't going to get you more, help: it probably will get you less.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Make a system that will allow the user to add, modify, display, search and delete record in a derived class 'Student'
Base class is 'Person'
|
|
|
|
|
Did you have a question or a problem with your code?
We're not here to do your homework for you.
|
|
|
|
|